[英]Visual Studio for Mac 17.4.3 can't build .NET MAUI project
我在获取 .NET 7.0 MAUI 项目以简单地从 Visual Studio for Mac 版本 17.4.3 构建时遇到问题。 它给我的消息表明一个旧的 .NET SDK 被用来定位 .NET 7.0:
/Applications/Visual Studio.app/Contents/MonoBundle/MSBuild/Current/bin/Microsoft.Common.CurrentVersion.targets(5,5):错误 MSB3971:“.NETFramework,Version=v7.0”的参考程序集不是成立。 您可能正在使用较旧的 .NET SDK 来定位 .NET 5.0 或更高版本。 更新 Visual Studio 和/或您的 .NET SDK。(MSB3971) (DataModel.Common)
但我的期望是,除非被global.json
覆盖,否则将始终使用最新安装的版本。 这是do.net --info
的 output:
.NET SDK:
Version: 7.0.200-preview.22628.1
Commit: 76bbaffad6
Runtime Environment:
OS Name: Mac OS X
OS Version: 13.2
OS Platform: Darwin
RID: osx.13-x64
Base Path: /usr/local/share/dotnet/sdk/7.0.200-preview.22628.1/
Host:
Version: 7.0.2
Architecture: x64
Commit: d037e070eb
.NET SDKs installed:
6.0.405 [/usr/local/share/dotnet/sdk]
7.0.102 [/usr/local/share/dotnet/sdk]
7.0.200-preview.22628.1 [/usr/local/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.32 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.17 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.13 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.23 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.32 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.17 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.13 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Other architectures found:
None
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
有问题的项目DataModel.Common
是编译器遇到的第一个项目,对 .NET SDK 版本也没有做任何花哨的事情:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<LangVersion>latest</LangVersion>
<Configurations>Debug;Release;Test</Configurations>
</PropertyGroup>
这也是带有Log verbosity: Diagnostic
Building MYAPP.Maui (Debug)
Build started 1/30/2023 1:41:45 PM.
Environment at start of build:
MSBUILDPROJECTROOTELEMENTCACHESIZE = 200
ServiceHubLogSessionKey = 91F98E44
DOTNET_MSBUILD_SDK_RESOLVER_CLI_DIR = /usr/local/share/dotnet
__CF_USER_TEXT_ENCODING = 0x1F5:0x0:0x0
USER = myuser
PKG_CONFIG_PATH = /Library/Frameworks/Mono.framework/Versions/6.12.0/lib/pkgconfig
XPC_FLAGS = 0x0
MONO_GC_PARAMS = nursery-size=64m
LD_LIBRARY_PATH = /Library/Frameworks/Mono.framework/Versions/6.12.0/lib:
TMPDIR = /var/folders/3n/s_99kk3x6p5654z53jq8tbsr0000gn/T/
XCODE_DEVELOPER_DIR_PATH =
COMPlus_EnableCrashReport = 1
COMPlus_DbgEnableMiniDump = 0
XBUILD_FRAMEWORK_FOLDERS_PATH =
DISPLAY = /private/tmp/com.apple.launchd.UbqOG3rTnn/org.macosforge.xquartz:0
COMPlus_DbgEnableFastHeapDumps = 1
XPC_SERVICE_NAME = application.com.microsoft.visual-studio-preview.184456257.184456797
HOME = /Users/myuser
MONO_PATH =
COMMAND_MODE = unix2003
__CFBundleIdentifier = com.microsoft.visual-studio-preview
PATH = /Library/Frameworks/Mono.framework/Commands:/Applications/Visual Studio (Preview).app/Contents/MacOS:/usr/bin:/bin:/usr/sbin:/sbin:/opt/homebrew/bin:/usr/local/bin:~/.dotnet/tools:/usr/local/share/dotnet
PKG_CONFIG_LIBDIR =
MSBUILD_EXE_PATH = /Users/myuser/Library/Caches/VisualStudio/17.0/MSBuild/63726_3/MonoDevelop.MSBuildBuilder.exe
DYLD_BIND_AT_LAUNCH = 1
SSH_AUTH_SOCK = /private/tmp/com.apple.launchd.vcMjUlwHTK/Listeners
SHELL = /bin/zsh
ServiceHubUniqueLogDir = vsmac
MONO_GAC_PREFIX =
COMPlus_EnableDumpOnSigTerm = 1
GTKSHARP_SLIM_STARTUP = yes
LOGNAME = myuser
__________________________________________________
Project "/Users/myuser/git/myapp/datamodel.common/DataModel.Common.csproj" (Build target(s)):
Building with tools version "Current".
Target "_CheckForUnsupportedTargetFramework" skipped, due to false condition; ('$(_UnsupportedTargetFrameworkError)' == 'true') was evaluated as ('' == 'true').
Target "_CollectTargetFrameworkForTelemetry" in file "/Users/myuser/Library/Caches/VisualStudio/17.0/MSBuild/63726_3/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets":
Using "Telemetry" task from assembly "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "Telemetry"
Done executing task "Telemetry".
Done building target "_CollectTargetFrameworkForTelemetry" in project "DataModel.Common.csproj".
Target "_CheckForUnsupportedNETCoreVersion" skipped, due to false condition; ('$(TargetFrameworkIdentifier)' == '.NETCoreApp' And '$(NETCoreAppMaximumVersion)' != '') was evaluated as ('.NETFramework' == '.NETCoreApp' And '5.0' != '').
Target "_CheckForUnsupportedCppNETCoreVersion" in file "/Users/myuser/Library/Caches/VisualStudio/17.0/MSBuild/63726_3/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets":
Task "NETSdkError" skipped, due to false condition; ('$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(_TargetFrameworkVersionWithoutV)' < '3.1' and '$(Language)' == 'C++') was evaluated as ('.NETFramework' == '.NETCoreApp' and '7.0' < '3.1' and 'C#' == 'C++').
Done building target "_CheckForUnsupportedCppNETCoreVersion" in project "DataModel.Common.csproj".
Target "_CheckForUnsupportedNETStandardVersion" skipped, due to false condition; ('$(TargetFrameworkIdentifier)' == '.NETStandard' And '$(NETStandardMaximumVersion)' != '') was evaluated as ('.NETFramework' == '.NETStandard' And '' != '').
Target "_CheckForUnsupportedTargetFrameworkAndFeatureCombination" in file "/Users/myuser/Library/Caches/VisualStudio/17.0/MSBuild/63726_3/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets":
Task "NETSdkError" skipped, due to false condition; ('$(UsingNETSdkDefaults)' != 'true') was evaluated as ('true' != 'true').
Done building target "_CheckForUnsupportedTargetFrameworkAndFeatureCombination" in project "DataModel.Common.csproj".
Target "_CheckForUnsupportedAppHostUsage" skipped, due to false condition; ('$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(HasRuntimeOutput)' == 'true') was evaluated as ('.NETFramework' == '.NETCoreApp' and '' == 'true').
Target "_CheckForMismatchingPlatform" skipped, due to false condition; ('$(RuntimeIdentifier)' != '' and '$(PlatformTarget)' != '') was evaluated as ('' != '' and '' != '').
Target "_CheckForLanguageAndFeatureCombinationSupport" in file "/Users/myuser/Library/Caches/VisualStudio/17.0/MSBuild/63726_3/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.RuntimeIdentifierInference.targets":
Task "NETSdkError" skipped, due to false condition; ('$(Language)' == 'C++' and $(OutputType) != 'library' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp') was evaluated as ('C#' == 'C++' and Library != 'library' and '.NETFramework' == '.NETCoreApp').
Task "NETSdkError" skipped, due to false condition; ('$(Language)' == 'C++' and $(EnableComHosting) == 'true') was evaluated as ('C#' == 'C++' and == 'true').
Task "NETSdkError" skipped, due to false condition; ('$(Language)' == 'C++' and $(SelfContained) == 'true') was evaluated as ('C#' == 'C++' and == 'true').
Done building target "_CheckForLanguageAndFeatureCombinationSupport" in project "DataModel.Common.csproj".
Target "_CheckForNETCoreSdkIsPreview" skipped, due to false condition; ( '$(_NETCoreSdkIsPreview)' == 'true' AND '$(SuppressNETCoreSdkPreviewMessage)' != 'true' ) was evaluated as ( 'false' == 'true' AND '' != 'true' ).
Target "_GetProjectJsonPath" in file "/Users/myuser/Library/Caches/VisualStudio/17.0/MSBuild/63726_3/NuGet.targets":
Task "GetRestoreProjectJsonPathTask" skipped, due to false condition; ( '$(RestoreProjectStyle)' == 'ProjectJson' OR '$(RestoreProjectStyle)' == '' ) was evaluated as ( 'PackageReference' == 'ProjectJson' OR 'PackageReference' == '' ).
Done building target "_GetProjectJsonPath" in project "DataModel.Common.csproj".
Target "_CheckForUnsupportedNETCoreVersion" skipped, due to false condition; ('$(TargetFrameworkIdentifier)' == '.NETCoreApp' And '$(NETCoreAppMaximumVersion)' != '') was evaluated as ('.NETFramework' == '.NETCoreApp' And '5.0' != '').
Target "_CheckForUnsupportedNETStandardVersion" skipped, due to false condition; ('$(TargetFrameworkIdentifier)' == '.NETStandard' And '$(NETStandardMaximumVersion)' != '') was evaluated as ('.NETFramework' == '.NETStandard' And '' != '').
Target "UpdateAspNetToFrameworkReference" skipped, due to false condition; ('$(TargetFrameworkIdentifier)' == '.NETCoreApp' And '$(_TargetFrameworkVersionWithoutV)' >= '3.0') was evaluated as ('.NETFramework' == '.NETCoreApp' And '7.0' >= '3.0').
Target "CheckForImplicitPackageReferenceOverrides" in file "/Users/myuser/Library/Caches/VisualStudio/17.0/MSBuild/63726_3/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.DefaultItems.targets":
Using "CheckForImplicitPackageReferenceOverrides" task from assembly "/Users/myuser/Library/Caches/VisualStudio/17.0/MSBuild/63726_3/Sdks/Microsoft.NET.Sdk/targets/../tools/net472/Microsoft.NET.Build.Tasks.dll".
Task "CheckForImplicitPackageReferenceOverrides"
Done executing task "CheckForImplicitPackageReferenceOverrides".
Done building target "CheckForImplicitPackageReferenceOverrides" in project "DataModel.Common.csproj".
Target "ApplyImplicitVersions" in file "/Users/myuser/Library/Caches/VisualStudio/17.0/MSBuild/63726_3/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.DefaultItems.targets":
Using "ApplyImplicitVersions" task from assembly "/Users/myuser/Library/Caches/VisualStudio/17.0/MSBuild/63726_3/Sdks/Microsoft.NET.Sdk/targets/../tools/net472/Microsoft.NET.Build.Tasks.dll".
Task "ApplyImplicitVersions"
Done executing task "ApplyImplicitVersions".
Done building target "ApplyImplicitVersions" in project "DataModel.Common.csproj".
Target "CheckForImplicitPackageReferenceOverrides" skipped. Previously built successfully.
Target "ProcessFrameworkReferences" skipped, due to false condition; ('@(FrameworkReference)' != '') was evaluated as ('' != '').
Target "_CheckForObsoleteDotNetCliToolReferences" in file "/Users/myuser/Library/Caches/VisualStudio/17.0/MSBuild/63726_3/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.ObsoleteReferences.targets":
Task "NETSdkWarning" skipped, due to false condition; ( '%(_ReferenceToObsoleteDotNetCliTool.Identity)' != '' ) was evaluated as ( '' != '' ).
Done building target "_CheckForObsoleteDotNetCliToolReferences" in project "DataModel.Common.csproj".
Target "CollectPackageReferences" in file "/Users/myuser/Library/Caches/VisualStudio/17.0/MSBuild/63726_3/NuGet.targets":
Using "CheckForDuplicateNuGetItemsTask" task from assembly "/Users/myuser/Library/Caches/VisualStudio/17.0/MSBuild/63726_3/NuGet.Build.Tasks.dll".
Task "CheckForDuplicateNuGetItemsTask"
Done executing task "CheckForDuplicateNuGetItemsTask".
Done building target "CollectPackageReferences" in project "DataModel.Common.csproj".
Target "_GetRestoreProjectStyle" in file "/Users/myuser/Library/Caches/VisualStudio/17.0/MSBuild/63726_3/NuGet.targets":
Using "GetRestoreProjectStyleTask" task from assembly "/Users/myuser/Library/Caches/VisualStudio/17.0/MSBuild/63726_3/NuGet.Build.Tasks.dll".
Task "GetRestoreProjectStyleTask"
(in) HasPackageReferenceItems 'True'
(in) MSBuildProjectDirectory '/Users/myuser/git/myapp/datamodel.common'
(in) MSBuildProjectName 'DataModel.Common'
(in) ProjectJsonPath ''
(in) RestoreProjectStyle 'PackageReference'
(out) IsPackageReferenceCompatibleProjectStyle 'True'
(out) ProjectStyle 'PackageReference'
Done executing task "GetRestoreProjectStyleTask".
Done building target "_GetRestoreProjectStyle" in project "DataModel.Common.csproj".
Target "EnableIntermediateOutputPathMismatchWarning" in file "/Users/myuser/Library/Caches/VisualStudio/17.0/MSBuild/63726_3/NuGet.targets":
Done building target "EnableIntermediateOutputPathMismatchWarning" in project "DataModel.Common.csproj".
Target "ApplyImplicitVersions" skipped. Previously built successfully.
Target "WarnForExplicitVersions" skipped, due to false condition; ('@(SdkBuildWarning)' != '') was evaluated as ('' != '').
Target "CheckForImplicitPackageReferenceOverrides" skipped. Previously built successfully.
Target "CheckForDuplicateItems" in file "/Users/myuser/Library/Caches/VisualStudio/17.0/MSBuild/63726_3/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.DefaultItems.targets":
Using "CheckForDuplicateItems" task from assembly "/Users/myuser/Library/Caches/VisualStudio/17.0/MSBuild/63726_3/Sdks/Microsoft.NET.Sdk/targets/../tools/net472/Microsoft.NET.Build.Tasks.dll".
Task "CheckForDuplicateItems"
Done executing task "CheckForDuplicateItems".
Task "CheckForDuplicateItems"
Done executing task "CheckForDuplicateItems".
Task "CheckForDuplicateItems"
Done executing task "CheckForDuplicateItems".
Done building target "CheckForDuplicateItems" in project "DataModel.Common.csproj".
Target "CheckWindowsDesktopSdkInUse" skipped, due to false condition; ('$(UseWpf)' == 'true' Or '$(UseWindowsForms)' == 'true') was evaluated as ('' == 'true' Or '' == 'true').
Target "ProcessFrameworkReferences" skipped, due to false condition; ('@(FrameworkReference)' != '') was evaluated as ('' != '').
Target "_CheckForInvalidConfigurationAndPlatform" in file "/Applications/Visual Studio (Preview).app/Contents/MonoBundle/MSBuild/Current/bin/Microsoft.Common.CurrentVersion.targets":
Task "Error" skipped, due to false condition; ( '$(_InvalidConfigurationError)' == 'true' ) was evaluated as ( '' == 'true' ).
Task "Warning" skipped, due to false condition; ( '$(_InvalidConfigurationWarning)' == 'true' ) was evaluated as ( '' == 'true' ).
Using "Message" task from assembly "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "Message"
Configuration=Debug
Done executing task "Message".
Task "Message"
Platform=AnyCPU
Done executing task "Message".
Task "Error" skipped, due to false condition; ('$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')) was evaluated as ('bin/Debug/net7.0/' != '' and !HasTrailingSlash('bin/Debug/net7.0/')).
Task "Error" skipped, due to false condition; ('$(IntermediateOutputPath)' != '' and !HasTrailingSlash('$(IntermediateOutputPath)')) was evaluated as ('obj/Debug/net7.0/' != '' and !HasTrailingSlash('obj/Debug/net7.0/')).
Task "Error" skipped, due to false condition; ('$(BaseIntermediateOutputPath)' != '' and !HasTrailingSlash('$(BaseIntermediateOutputPath)')) was evaluated as ('obj/' != '' and !HasTrailingSlash('obj/')).
Task "Error" skipped, due to false condition; ( '$(_InitialMSBuildProjectExtensionsPath)' != '' And '$(MSBuildProjectExtensionsPath)' != '$(_InitialMSBuildProjectExtensionsPath)' ) was evaluated as ( '/Users/myuser/git/myapp/datamodel.common/obj/' != '' And '/Users/myuser/git/myapp/datamodel.common/obj/' != '/Users/myuser/git/myapp/datamodel.common/obj/' ).
Task "Warning" skipped, due to false condition; ( '$(EnableBaseIntermediateOutputPathMismatchWarning)' == 'true' And '$(_InitialBaseIntermediateOutputPath)' != '$(BaseIntermediateOutputPath)' And '$(BaseIntermediateOutputPath)' != '$(MSBuildProjectExtensionsPath)' ) was evaluated as ( 'true' == 'true' And 'obj/' != 'obj/' And 'obj/' != '/Users/myuser/git/myapp/datamodel.common/obj/' ).
Done building target "_CheckForInvalidConfigurationAndPlatform" in project "DataModel.Common.csproj".
Target "BeforeBuild" in file "/Applications/Visual Studio (Preview).app/Contents/MonoBundle/MSBuild/Current/bin/Microsoft.Common.CurrentVersion.targets":
Done building target "BeforeBuild" in project "DataModel.Common.csproj".
Target "_CheckForBuildWithNoBuild" skipped, due to false condition; ('$(NoBuild)' == 'true' and '$(GeneratePackageOnBuild)' != 'true') was evaluated as ('' == 'true' and 'false' != 'true').
Target "BuildOnlySettings" in file "/Applications/Visual Studio (Preview).app/Contents/MonoBundle/MSBuild/Current/bin/Microsoft.Common.CurrentVersion.targets":
Done building target "BuildOnlySettings" in project "DataModel.Common.csproj".
Target "_CheckForUnsupportedTargetFramework" skipped, due to false condition; ('$(_UnsupportedTargetFrameworkError)' == 'true') was evaluated as ('' == 'true').
Target "GetFrameworkPaths" in file "/Applications/Visual Studio (Preview).app/Contents/MonoBundle/MSBuild/Current/bin/Microsoft.NETFramework.CurrentVersion.targets":
Done building target "GetFrameworkPaths" in project "DataModel.Common.csproj".
Target "GetFrameworkPaths" skipped. Previously built successfully.
Target "_CheckForUnsupportedTargetFramework" skipped, due to false condition; ('$(_UnsupportedTargetFrameworkError)' == 'true') was evaluated as ('' == 'true').
Target "GetReferenceAssemblyPaths" in file "/Applications/Visual Studio (Preview).app/Contents/MonoBundle/MSBuild/Current/bin/Microsoft.Common.CurrentVersion.targets":
Using "GetReferenceAssemblyPaths" task from assembly "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "GetReferenceAssemblyPaths"
/Applications/Visual Studio (Preview).app/Contents/MonoBundle/MSBuild/Current/bin/Microsoft.Common.CurrentVersion.targets(1232,5): error MSB3971: The reference assemblies for ".NETFramework,Version=v7.0" were not found. You might be using an older .NET SDK to target .NET 5.0 or higher. Update Visual Studio and/or your .NET SDK.
Done executing task "GetReferenceAssemblyPaths" -- FAILED.
Done building target "GetReferenceAssemblyPaths" in project "DataModel.Common.csproj" -- FAILED.
Target "_CheckForCompileOutputs" in file "/Applications/Visual Studio (Preview).app/Contents/MonoBundle/MSBuild/Current/bin/Microsoft.Common.CurrentVersion.targets":
Done building target "_CheckForCompileOutputs" in project "DataModel.Common.csproj".
Target "_SGenCheckForOutputs" skipped, due to false condition; ('$(_SGenGenerateSerializationAssembliesConfig)' == 'On' or ('@(WebReferenceUrl)'!='' and '$(_SGenGenerateSerializationAssembliesConfig)' == 'Auto')) was evaluated as ('Off' == 'On' or (''!='' and 'Off' == 'Auto')).
Target "_CleanGetCurrentAndPriorFileWrites" in file "/Applications/Visual Studio (Preview).app/Contents/MonoBundle/MSBuild/Current/bin/Microsoft.Common.CurrentVersion.targets":
Using "ReadLinesFromFile" task from assembly "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "ReadLinesFromFile"
Done executing task "ReadLinesFromFile".
Using "ConvertToAbsolutePath" task from assembly "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "ConvertToAbsolutePath"
Done executing task "ConvertToAbsolutePath".
Using "FindUnderPath" task from assembly "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "FindUnderPath"
Comparison path is "/Users/myuser/git/myapp/datamodel.common".
Done executing task "FindUnderPath".
Task "FindUnderPath"
Comparison path is "bin/Debug/net7.0/".
Done executing task "FindUnderPath".
Task "FindUnderPath"
Comparison path is "obj/Debug/net7.0/".
Done executing task "FindUnderPath".
Using "RemoveDuplicates" task from assembly "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "RemoveDuplicates"
Done executing task "RemoveDuplicates".
Done building target "_CleanGetCurrentAndPriorFileWrites" in project "DataModel.Common.csproj".
Target "_CleanRecordFileWrites" in file "/Applications/Visual Studio (Preview).app/Contents/MonoBundle/MSBuild/Current/bin/Microsoft.Common.CurrentVersion.targets":
Task "RemoveDuplicates"
Done executing task "RemoveDuplicates".
Using "MakeDir" task from assembly "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "MakeDir"
Done executing task "MakeDir".
Using "WriteLinesToFile" task from assembly "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "WriteLinesToFile"
Done executing task "WriteLinesToFile".
Done building target "_CleanRecordFileWrites" in project "DataModel.Common.csproj".
Done building project "DataModel.Common.csproj" -- FAILED.
Project Performance Summary:
877 ms /Users/myuser/git/myapp/datamodel.common/DataModel.Common.csproj 1 calls
Target Performance Summary:
0 ms BuildOnlySettings 1 calls
0 ms EnableIntermediateOutputPathMismatchWarning 1 calls
0 ms _CheckForUnsupportedCppNETCoreVersion 1 calls
0 ms BeforeBuild 1 calls
0 ms _CheckForUnsupportedTargetFrameworkAndFeatureCombination 1 calls
0 ms _GetProjectJsonPath 1 calls
0 ms _CheckForLanguageAndFeatureCombinationSupport 1 calls
2 ms _CheckForObsoleteDotNetCliToolReferences 1 calls
4 ms _CheckForCompileOutputs 1 calls
9 ms GetFrameworkPaths 1 calls
12 ms CheckForDuplicateItems 1 calls
15 ms _CheckForInvalidConfigurationAndPlatform 1 calls
17 ms CollectPackageReferences 1 calls
30 ms _CleanRecordFileWrites 1 calls
40 ms _GetRestoreProjectStyle 1 calls
42 ms ApplyImplicitVersions 1 calls
54 ms GetReferenceAssemblyPaths 1 calls
88 ms CheckForImplicitPackageReferenceOverrides 1 calls
178 ms _CollectTargetFrameworkForTelemetry 1 calls
277 ms _CleanGetCurrentAndPriorFileWrites 1 calls
Task Performance Summary:
4 ms ConvertToAbsolutePath 1 calls
5 ms Message 2 calls
6 ms RemoveDuplicates 2 calls
7 ms CheckForDuplicateItems 3 calls
10 ms WriteLinesToFile 1 calls
10 ms CheckForDuplicateNuGetItemsTask 1 calls
15 ms ApplyImplicitVersions 1 calls
17 ms MakeDir 1 calls
31 ms GetRestoreProjectStyleTask 1 calls
39 ms CheckForImplicitPackageReferenceOverrides 1 calls
46 ms Telemetry 1 calls
52 ms GetReferenceAssemblyPaths 1 calls
77 ms ReadLinesFromFile 1 calls
184 ms FindUnderPath 3 calls
Build FAILED.
/Applications/Visual Studio (Preview).app/Contents/MonoBundle/MSBuild/Current/bin/Microsoft.Common.CurrentVersion.targets(1232,5): error MSB3971: The reference assemblies for ".NETFramework,Version=v7.0" were not found. You might be using an older .NET SDK to target .NET 5.0 or higher. Update Visual Studio and/or your .NET SDK.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:03.84
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Build: 1 error, 0 warnings
谁能帮我从 Visual Studio for Mac 运行这个应用程序?
先感谢您。
我在使用 VS for Mac 17.4.4 时遇到了同样的问题。
请注意,在终端中运行“do.net watch”确实有效,但当然我不能用这种方式调试我的代码......
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.