-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ProjectReference
does not import build.props/build.targets to like PackageReference
does
#35704
Comments
Tagging subscribers to this area: @dotnet/area-infrastructure-libraries Issue DetailsI'm working on NativeAOT with reflection using <ItemGroup>
<Content Include="build\*.*">
<Pack>true</Pack>
<PackagePath>build;</PackagePath>
</Content>
</ItemGroup> build/Plugin.props <?xml version="1.0" encoding="utf-8"?>
<Project>
<ItemGroup>
<RdXmlFile Include="$(MSBuildThisFileDirectory)Plugin.Rd.xml"/>
</ItemGroup>
</Project> build/Plugin.Rd.xml <Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
<Application>
<Assembly Name="Plugin">
<Type Name="Plugin.UseReflectionClass" Dynamic="Required All"/>
</Assembly>
</Application>
</Directives> If I pack Plugin to a nuget package, and use Create a new nuget package every time library project changed code is too much trouble, how to use
|
Unsure if dotnet/sdk is the right repository. Maybe NuGet or msbuild is a better place? |
I found a similar issue In Nuget repo NuGet/Home#6624 but it's 5 years before and not solved. I think feedback should not helpful there. |
Yes, we have several issues requesting this type of feature: NuGet/Home#6624, dotnet/msbuild#5797 As mentioned here I believe this could work as we already require an additional evaluation pass for restore which could then import these files to subsequent evaluations. It's probably a matter of priority, cost and the potential of breaking existing customers. I would love to see such a feature. |
Hope to see such a feature too. I have already use |
I'm working on NativeAOT with reflection using
Rd.xml
.I create a library project named
Plugin
. in the project I create build directory and Plugin.props and Plugin.Rd.xml in it and pack it in to package like this:Plugin.csproj
build/Plugin.props
build/Plugin.Rd.xml
If I pack Plugin to a nuget package, and use
<ProjectReference Include="..\Plugin\Plugin.csproj" />
to reference it, It works correctly, I can publish my exe to native aot and use the RdXmlFile whatPlugin
project specified with no more configuration.But when I directly use ProjectReference like
<ProjectReference Include="..\Plugin\Plugin.csproj" />
in my exe project, It does not work. It looks like does not import thebuild/Plugin.props
to my exe project.Create a new nuget package every time library project changed code is too much trouble, how to use
ProjectReference
behave likePackageReference
?The text was updated successfully, but these errors were encountered: