重定向到 net standard 2.0 后,没有构建解决方案和打开项目属性的选项
There is no option to build solution and open properties of project after retarget to net standard 2.0
复制
- 我使用针对 net 4.6.1 的项目及其测试项目创建了新的解决方案。
- 项目是从 VS 2017 中创建的解决方案复制的
- 我变了
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFramework>netstandard2.0</TargetFramework>
用于单元测试和库项目 (<OutputType>Library</OutputType>
)。
现在我无法构建解决方案。当我打开项目属性 window 时,我看到错误:
An error occurred trying to load the project properties window. Close the window and try again. Member not found. (Exception from HRESULT: 0x80020003 (DISP_E_MEMBERNOTFOUND))
这有帮助吗?
Ran into the same issue myself. Appears to be an issue with the solution file. I removed the project from the solution then added it back again. This cause VS to recognize this as the correct project type. Hope this helps somebody else from spending too much time on this issue.
Visual studio 2017 not treating csproj as a valid project file after conversion from netstandard to framework
回答
我不得不更换:
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
至:
<Project Sdk="Microsoft.NET.Sdk">
在我的 csproj 文件中
来源:
https://arminreiter.com/2017/05/port-net-framework-net-standard/
复制
- 我使用针对 net 4.6.1 的项目及其测试项目创建了新的解决方案。
- 项目是从 VS 2017 中创建的解决方案复制的
- 我变了
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFramework>netstandard2.0</TargetFramework>
用于单元测试和库项目 (<OutputType>Library</OutputType>
)。
现在我无法构建解决方案。当我打开项目属性 window 时,我看到错误:
An error occurred trying to load the project properties window. Close the window and try again. Member not found. (Exception from HRESULT: 0x80020003 (DISP_E_MEMBERNOTFOUND))
这有帮助吗?
Ran into the same issue myself. Appears to be an issue with the solution file. I removed the project from the solution then added it back again. This cause VS to recognize this as the correct project type. Hope this helps somebody else from spending too much time on this issue.
Visual studio 2017 not treating csproj as a valid project file after conversion from netstandard to framework
回答
我不得不更换:
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
至:
<Project Sdk="Microsoft.NET.Sdk">
在我的 csproj 文件中
来源: https://arminreiter.com/2017/05/port-net-framework-net-standard/