You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I create an instance of my project (running under experimental vs instance) - nuget works great, and package references work in that if I add a nuget package I can see the package reference added to the project file, and I can see the reference listed in solution explorer.
However, when editing a csharp file, the assembly that has been added via Nuget cannot be resolved by Roslyn. I assume I am missing some XAML rules?
Please can you document / describe, what is needed to fully support package references, from a brand new project type.
i.e
What XAML rules are needed?
What capabilities are needed?
What ms build targets / props are needed? (I,e is Project Sdk="Microsoft.NET.Sdk" enough?)
Thank you.
The text was updated successfully, but these errors were encountered:
When you're CPS and also declare TargetFramework property <TargetFramework>net45</TargetFramework> then NuGet treat it as .net core based project which means it waits for the nomination from project system in order to do restore for the packages which you might not be doing. So even though you added packages via PackageReference but they are never restored or added into project itself. You can also confirm it by running a solution restore explicitly which will fail in this case or going into /obj folder and look for project.assets.json file, it won't b there or missing those package references.
So I will suggest instead of going into CPS packageReference with nomination structure which is much more complicated further. You can fall into CPS packageReference legacy csproj type which is essentially without TargetFramework and TargetFrameworks properties (since for time being, NuGet uses these properties to differentiate between PackageReference .net core and PackageReference legacy) and you should be able to use PackageReference as a way to manage your package dependencies.
Hi,
I am developing my own custom project type (CPS), and trying to leverage
<PackageReference>
.My custom project file (template) looks like this:
When I create an instance of my project (running under experimental vs instance) - nuget works great, and package references work in that if I add a nuget package I can see the package reference added to the project file, and I can see the reference listed in solution explorer.
However, when editing a csharp file, the assembly that has been added via Nuget cannot be resolved by Roslyn. I assume I am missing some XAML rules?
Please can you document / describe, what is needed to fully support package references, from a brand new project type.
i.e
Project Sdk="Microsoft.NET.Sdk"
enough?)Thank you.
The text was updated successfully, but these errors were encountered: