gpt4 book ai didi

c# - Visual Studio 2012 网络共享

转载 作者:太空狗 更新时间:2023-10-29 20:59:11 25 4
gpt4 key购买 nike

我使用 Parallels 在 VM 上模拟 Windows 8。为了简单和连贯,我将所有开发人员项目存储在我的 Mac 分区上。

当我尝试构建运行此网络共享的应用程序 (Visual Studio 2012) 时,出现以下编译时错误:

错误 1 ​​错误:DEP0700:应用注册失败。拒绝从 file:///Z:/Users/MY_USER_NAME/Sites/App1/App1/bin/Debug/AppX/AppxManifest.xml 注册的请求,因为这些文件位于网络共享上。在注册包之前将文件复制到本地计算机。 (0x80073cf9) App1

有谁知道如何解决这个问题?我需要告诉 Visual Studio 2012 我的网络共享是受信任的设备,或者至少让它认为项目在本地驱动器中。无论如何在 Windows 中创建符号链接(symbolic link)?

在 Visual Studio 2010 中,我解决了这个网站上列出的问题:http://www.sehajpal.com/index.php/2010/10/how-to-solve-loadfromremotesources-error-in-vs-2010/

感谢您的帮助!

最佳答案

This post by Gearard Boland解决了这个问题。希望这对通过网络共享进行开发的任何其他人都有用:

Yes, it's by design that you cannot run a Metro app from a network drive and deployment from Visual Studio essentially registers the app with the system without actually packaging and installing it (so it doesn't get put into the normal install location, which is local).

You can still work with sources on a network drive, but you'll have to override the deployment location, which by default is under the project's root directory (e.g. bin\). You have several options:

  1. You can switch from local debugging to remote debugging and set the machine name as 'localhost'. This will do a remote deployment on your local machine (thus not using the project's directory). You don't need to install the Remote Debugger tools, nor start msvsmon for this to work on localhost.
  2. You can override the project's output directory. Right-click on the project and change the output directory to something like: $(Temp)\$(MSBuildProjectName)\bin\$(Configuration), where Temp is an environment variable pointing to your Temp directory.
  3. If you still want normal output to live next to the sources, e.g. when you build the appx package, etc., you can override only the layout directory instead of the entire output path. For this you'll need to modify your project file directly (e.g. *.jsproj, *.csproj, ...) to add the new value:

     <PropertyGroup>
    <LayoutDir>C:\WorkingFolder\$(MSBuildProjectName)\$(Configuration)</LayoutDir>
    </PropertyGroup>

Hope that helps.

关于c# - Visual Studio 2012 网络共享,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12786800/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com