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
{{ message }}
This repository has been archived by the owner on Jul 14, 2020. It is now read-only.
I took the sample (internal) project "Template-VS2017-CloudBuild" which worked fine, and added CBT.UnifiedOutputDir (2.0.16) to it. This causes the following error to happen:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\NuGet\15.0\Microsoft.NuGet.targets(186,5):
error : Your project is not referencing the ".NETFramework,Version=v4.6" framework.
Add a reference to ".NETFramework,Version=v4.6" in the "frameworks" section of your project.json, and then re-run NuGet restore.
I also created a new .NET Core project which was not affected by this problem.
The text was updated successfully, but these errors were encountered:
There's another problem in that the project.assets.json is being put in the root of the shared intermediate output folder (obj)... which obviously causes issues when all projects are sharing it 🙂
Error message is like:
1>C:\Program Files\dotnet\sdk\2.1.300\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(198,5): error : Assets file '...\obj\project.assets.json' doesn't have a target for '.NETStandard,Version=v2.0'. Ensure that restore has run and that you have included 'netstandard2.0' in the TargetFrameworks for your project.
Thanks for reporting this. The CBT.UnifiedOutputDir appears to have a conflict with the fundamental concept of what BaseIntermediateOutputPath is. In NuGet 3.0, they took over BaseIntermediateOutputPath and treated it as a unique-per-project but platform and configuration agnostic folder. However, CBT.UnifiedOutputDir treats BaseIntermediateOutputPath as a repository-wide folder where projects then add on to it.
So the root of the issue is that the project.assets.json file for all projects in the tree are written to the same location. This means that during build, projects are using another project's assets file which is wrong and the build fails.
So we'll need to rework the package if we ever want it to work with PackageReference and NuGet v3+
I took the sample (internal) project "Template-VS2017-CloudBuild" which worked fine, and added
CBT.UnifiedOutputDir
(2.0.16) to it. This causes the following error to happen:I also created a new .NET Core project which was not affected by this problem.
The text was updated successfully, but these errors were encountered: