简体   繁体   English

将现有网站添加到Visual Studio解决方案会引发System.InvalidOperationException

[英]Adding an existing website to Visual Studio solution throws a System.InvalidOperationException

I am trying to add an existing ASP.NET website to a Visual Studio 2015 solution, when I add the files they will all show up under the solution, but then the application crashes and restarts. 我试图将现有的ASP.NET网站添加到Visual Studio 2015解决方案中,当我添加文件时,它们都会全部显示在解决方案下,但随后应用程序崩溃并重新启动。 When VS restarts my solution is empty. 当VS重新启动时,我的解决方案为空。 The error message being displayed is: 显示的错误消息是:

An unhandled exception of type 'System.InvalidOperationException' occurred in mscorlib.dll mscorlib.dll中发生了类型为'System.InvalidOperationException'的未处理异常

Additional information: This operation is not supported for a relative URI. 附加信息:相对URI不支持此操作。

The website I am trying to add is a network location I have mapped as a network drive. 我要添加的网站是我已映射为网络驱动器的网络位置。

This worked fine for me in VS 2010, however trying to add to VS 2015 always throws this error. 这在VS 2010中对我来说效果很好,但是尝试添加到VS 2015中总是会抛出此错误。 I tried repairing the VS installation as well as ensuring I am up to date. 我尝试修复VS安装并确保我是最新的。 No one else on my team seems to have this issue, anyone have any ideas? 我团队中没有其他人似乎有这个问题,有人有什么想法吗?

Thanks! 谢谢!

Well, I believe I have a solution - when adding the website I was selecting the mapped network drive from the file system, instead of entering the full network path. 好吧,我相信我有一个解决方案-添加网站时,我是从文件系统中选择映射的网络驱动器,而不是输入完整的网络路径。 This worked for VS 2010, but apparently not for 2015, this seems to require the full network path... anyway, problem solved. 这适用于VS 2010,但显然不适用于2015,这似乎需要完整的网络路径...无论如何,问题已解决。

Incorrect: selecting a website mapped to a drive letterr, ie L:\\ 错误:选择了映射到驱动器盘符的网站,即L:\\

Correct: selecting the full network path to the website, ie \\\\server\\website 正确:选择网站的完整网络路径,即\\\\server\\website

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 代码抛出System.InvalidOperationException - Code throws System.InvalidOperationException XmlSerializer引发System.InvalidOperationException - XmlSerializer throws System.InvalidOperationException FlowDocumentReader 抛出 System.InvalidOperationException - FlowDocumentReader throws System.InvalidOperationException Xamarin Studio:System.InvalidOperationException - Xamarin Studio: System.InvalidOperationException MediaElement.Source 抛出“System.InvalidOperationException” - MediaElement.Source throws 'System.InvalidOperationException' OracleCommand.Executenonquery抛出“ System.InvalidOperationException” - OracleCommand.Executenonquery throws 'System.InvalidOperationException' c#Delegate抛出System.InvalidOperationException - c# Delegate Throws System.InvalidOperationException System.InvalidOperationException-添加动态计数日期 - System.InvalidOperationException - adding dynamic countdate 将行添加到Datagrid时,C#WPF抛出System.InvalidOperationException - C# WPF throws System.InvalidOperationException when adding Row to Datagrid System.Data.dll中发生类型为'System.InvalidOperationException'的未处理异常-C#Visual Studio - An unhandled exception of type 'System.InvalidOperationException' occurred in System.Data.dll - C# visual studio
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM