Mac OS和Visual Studio错误 [英] Mac OS and Visual Studio errors

查看:51
本文介绍了Mac OS和Visual Studio错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我尝试运行此项目时遇到的错误.这个模块中没有什么比简单的代码足以显​​示"hello world"了.我在另一台具有相同精确设置的macbook上运行了相同版本的Visual Studio,并且运行完美.任何朝着正确方向前进的人都将不胜感激.

This is the error I'm getting when I attempt to run this project. There is nothing more in this module than simple code enough to display "hello world" I am running the same exact version of visual studio on another macbook I have with the same exact settings and it works perfectly. Any nudge in the right direction would be greatly appreciated.

/usr/local/share/dotnet/sdk/2.2.300/Current/Microsoft.Common.props(62,3):错误MSB4019:导入的项目"/Users/indianacones88/Documents/C#:ASP.NET找不到"/myApp/obj/myApp.csproj.*.props".确认声明中的路径正确,并且文件在磁盘上.[/Users/indianacones88/Documents/C#:ASP.NET/myApp/myApp.csproj]

/usr/local/share/dotnet/sdk/2.2.300/Current/Microsoft.Common.props(62,3): error MSB4019: The imported project "/Users/indianacones88/Documents/C#:ASP.NET/myApp/obj/myApp.csproj.*.props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. [/Users/indianacones88/Documents/C#:ASP.NET/myApp/myApp.csproj]

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>netcoreapp2.2</TargetFramework>
    <AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
  </PropertyGroup>

更新:

这是在.csproj文件中找到的代码

This is the code that is found inside in .csproj file

   <PackageReference Include="Microsoft.AspNetCore.App"/>
   <PackageReference Include="Microsoft.AspNetCore.Razor.Design"            Version="2.2.0" PrivateAsse$
 </ItemGroup>

</Project>

其他信息:

我使用了终端命令dotnet new console -o项目名称".从命令行创建Web应用程序项目并在Visual Studio中直接创建项目时,我也遇到了相同的错误.

I used the terminal command dotnet new console -o "project name". I have also had the same error when creating web app projects from the command line and directly creating a project inside visual studio.

不,我很抱歉,我不清楚.我没有复制只有两台MacBooks的文件,而是想在两台MacBooks上都可以正常工作的C#环境.我都下载了Visual Studio.试图创建简单的项目,一个可行,而另一个却没有.我已经检查过了,设置是一样的.我不确定h

No, my apologies I wasn't clear. I didn't copy the files I just have two MacBooks and wanted to set up a working C# environment on both. I downloaded visual studio on both. Attempted to create simple projects and one worked and the other did not. I have checked and the setting are the same. I'm not sure h

推荐答案

从路径中的文件夹名称中删除:,因为这似乎使Microsoft编译器感到困惑,这可能是由于Microsoft操作系统文件系统上的冒号.

Remove the : from the folder name in the path, as this seems to confuse the Microsoft compiler, perhaps due to the meaning of colon on Microsoft operating system file systems.

这篇关于Mac OS和Visual Studio错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆