Closed hankovich closed 12 months ago
I can't repro this. The library:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PackageId>ClassLibrary</PackageId>
<PackOnBuild>true</PackOnBuild>
<TargetFramework />
<TargetFrameworks>netstandard2.0;net8.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NuGetizer" Version="1.1.0" />
</ItemGroup>
</Project>
The clearing of TF seems to breaking other things in VS, even if I remove nugetizer:
1>------ Rebuild All started: Project: ClassLibrary6, Configuration: Debug Any CPU ------
Restored C:\Delete\ClassLibrary6\ClassLibrary6\ClassLibrary6.csproj (in 16 ms).
1>C:\Program Files\dotnet\sdk\8.0.100-preview.6.23330.14\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(314,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
1>C:\Program Files\dotnet\sdk\8.0.100-preview.6.23330.14\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(314,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
1>C:\Program Files\dotnet\sdk\8.0.100-preview.6.23330.14\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(266,5): error NETSDK1005: Assets file 'C:\Delete\ClassLibrary6\ClassLibrary6\obj\project.assets.json' doesn't have a target for 'net8.0'. Ensure that restore has run and that you have included 'net8.0' in the TargetFrameworks for your project.
1>Done building project "ClassLibrary6.csproj" -- FAILED.
From cmdline it works though.
Perhaps this was a fluke in the editor?
Also, the russian error message is not from nugetizer but MSBuild itself (messages with codes starting with MSB
are built-in ones).
Closing for now since I couldn't repro. Please reopen if you can provide a reliable (and ideally isolated) repro.
Thanks!
I have the following content in my csproj
And the build is broken
If I'll remove
<TargetFramework />
then everything will work as expected. As being said, it's needed to override the default value that comes fromDirectory.Build.props
.BTW calling
nugetize
from the command line shows another errorNuGetizer.targets(14,3): error MSB4020: ╨╖╨╜╨░╤З╨╡╨╜╨╕╨╡ "" ╨░╤В╤А╨╕╨▒╤Г╤В╨░ "Project" ╨▓ ╤Н╨╗╨╡╨╝╨╡╨╜╤В╨╡ <Import> ╨╜╨╡╨┤╨╛╨┐╤Г╤Б╤В╨╕╨╝╨╛.
, so it looks like errors in russian are not displayed correctly.