Visual Studio 2017项目无法在Mac上的Parallels Desktop中运行/调试?

时间:2017-04-09 17:06:29

标签: c# visual-studio visual-studio-2017

我真的需要你的帮助。我是新学习C#的人。我已经按照 Head First C#的每个步骤进行操作。在本书中,Visual Studio版本是2012,它告诉我创建的项目类型是Blank App(XAML)Visual C#,我在Visual Studio 2017中找不到,所以我选择下面描述的类型

关于我的电脑/系统:

软件:Microsoft Visual Studio 2017。

项目类型为:空白应用程序(通用Windows)Visual C#。

计算机:使用Parallels Desktop在Mac OSX上运行Windows10。

Parallels Desktop,是一款用于在Mac上运行Windows 10的虚拟机软件。我在这个虚拟机中创建了我的项目,在完成项目后按照书中的步骤,编辑器中没有错误。但是在我按下绿色播放按钮后,我在下面发布了一些错误。

error

3 个答案:

答案 0 :(得分:6)

  1. Check your project is stored in the C:\ drive of Windows10 running in the Parallels Desktop.

  2. If you can't find where you store your project:

    1. Back to your Mac OSX > Finder > iCloud Drive > Documents > Visual Studio 2017 > Projects > Check that whether your project is stored in here, if it does, I will solve your problem.
    2. If your project is already stored in the C:\ of Windows10 in Parallels Desktop, go search other solution, I can't solve your problem, sorry.
  3. You stored your project in the wrong place.

  4. Don't copy and paste your project directly to Windows10 in the Parallels Desktop.

  5. Create the project again. Yes, create it again... But this time, make sure your project is stored in the C:\ in the Parallels Desktop(I mean that the location of your project start with C:\ ).


Explain about the error message in the picture:

First I want to say, I'm new to Visual Studio 2017, and I don't know why the language displayed in the Output contains Chinese, I've already changed it to English in the environment settings. Sorry about that if you can't read Chinese.

But what it means in English is :

Windows can't deploy/debug your project because your project is stored in the file system of type PrlSF.

Since the default path of my project is:

In Windows on Parallels Desktop > iCloud on 'Mac'(X:) > Documents > Visual Studio 2017 > ...

If you right click the iCloud on 'Mac'(X:), you will find that it is of type PrlSF. Yes, as the error message shown, you've stored your project in the wrong place.

答案 1 :(得分:0)

我遇到了同样的问题,并在Parallels论坛中找到了以下解决方案: https://forum.parallels.com/threads/prlsf-permissions-issue-when-developing-an-uwp-app-in-visual-studio.342549/

因此功劳归于论坛中的用户JakubZ:

  

为进一步参考,解决此问题的步骤如下:

     
      
  1. 卸载UWP项目(R单击项目,然后选择“卸载项目”
  2.   
  3. 在VS中编辑项目文件(右键单击已卸载的项目,然后选择“编辑...”)
  4.   
  5. 找到OutputPath的XML条目。例如,在构建Debug | x86时,OutputPath的条目应类似于   bin / x86 / Debug。请注意,该条目包含   相对路径。
  6.   
  7. 在VM驱动器之一上将路径编辑为绝对路径。例如,将路径设置为%TEMP%\ UWPBuilds \ x86 \ Debug目录   为用户写$(TEMP)\ Debug
  8.   
  9. 关闭项目文件
  10.   
  11. 重新加载项目(R单击已卸载的项目,然后选择“重新加载项目”)。
  12.   

此外:由于我具有多个运行配置,所以我也具有多个OutputPath条目。我必须相应地更改它们。

答案 2 :(得分:-1)

您确定选择了绿色按钮旁边的“Debug”模式,而不是“Release”吗? 您可能正在尝试部署应用程序,而不是在Visual studio - Debug模式下运行它。