无法在 Visual Studio 2013 中创建新的 Web 项目 [英] Unable to create a new web project in Visual Studio 2013

查看:42
本文介绍了无法在 Visual Studio 2013 中创建新的 Web 项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

背景:

我正在尝试在家中使用我的办公室机器,但我的权限有限.当我连接到我的配置文件所在的网络驱动器时,所有产品都是通过安装的.

I am trying to use my office machine, where I have some limited rights, from home. All products are installed through when I was connected with my network drives, where my profile exists.

现在,我在家中无法访问这些网络驱动器.

Now, I am at home where I don't have an access to these network drives.

问题:

每当我尝试在 Visual Studio 中创建项目时,我都会收到以下错误:

Whenever I am trying to create a project in visual studio I am getting the following errors:

---------------------------
Microsoft Visual Studio
---------------------------
Package 'ProviderPackage' failed to load.
---------------------------

发现:

在做了一些研究之后,我发现这是由于 IISExpress.我已经确保从工具 > 选项 > Web 项目,IIS express 没有为所有新的 Web 项目启用.

After doing some research I found that it is due to IISExpress. I have ensured that from Tools > options > Web project that IIS express is not enabled for all new web project.

我也收到了一个错误:

---------------------------
Microsoft Visual Studio
---------------------------
Configuring IIS Express failed with the following error:

Filename: redirection.config

Error: Cannot read configuration file

---------------------------

然后我意识到可能是它无法使用 IIS 进行实例化.然后我尝试从命令提示符运行 IIS express,但出现此错误:

Then I realized that may be it is not able to instantiate with IIS. Then I have tried to run an IIS express from the command prompt and I got this error:

C:Program FilesIIS Express>iisexpress.exe

C:Program FilesIIS Express>iisexpress.exe

读取配置信息时出错.确保那个配置文件NAUNSW001MalhAmIISExpressconfigapplicationhost.config 存在,它是可访问的,并且包含有效的配置信息.

An error occurred while reading configuration information. Make sure that the configuration file NAUNSW001MalhAmIISExpressconfigapplicationhost.config exi sts, it is accessible, and contains valid configuration information.

我无法访问 IISexpress 可能会选择此路径的注册表.

I don't have an access to the registry where this path might be picked by the IISexpress.

我尝试执行 IISexpress/path: c:vs 它有效.然而,即使如此,当我尝试创建一个新项目时,我也收到了一个错误:

I have tried to execute the IISexpress /path: c:vs it worked. However, even then also when I am trying to create a new project I got an error as:

---------------------------
Microsoft Visual Studio
---------------------------
Configuring IIS Express failed with the following error:

Filename: redirection.config

Error: Cannot read configuration file

推荐答案

好的 - 我可以找到解决方法.

Alright - I am able to find the workaround.

如果您发现此错误,那么可能与您可能无法在家控制的 IISExpress 或 IIS 配置有关.

If you find this error coming then probably it is to do with the IISExpress or IIS configuration that you may not be able to control from home.

我发现的解决方法是:

  1. 创建项目,
  2. 系统将无法附加该项目,但该项目已创建.然后浏览到创建项目的目录,并在记事本或任何编辑器中打开项目文件.
  3. 确保 <UseIISExpress>false</UseIISExpress>
  4. 在进一步修改项目文件之前,在您的 IIS 中创建一个虚拟目录并指向项目路径.
  5. 在您的项目文件配置中找到 <WebProjectProperties>.
  6. 定义IISUrl下的虚拟目录路径.

你的配置文件应该是这样的:

Your config file should look something like this:

<WebProjectProperties>
          <UseIIS>True</UseIIS>
          <AutoAssignPort>True</AutoAssignPort>
          <DevelopmentServerPort>0</DevelopmentServerPort>
          <DevelopmentServerVPath>/</DevelopmentServerVPath>
          <IISUrl>http://localhost/YourAppAlias/</IISUrl>
          <NTLMAuthentication>False</NTLMAuthentication>
          <UseCustomServer>False</UseCustomServer>
          <CustomServerUrl>
          </CustomServerUrl>
          <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
        </WebProjectProperties>

这篇关于无法在 Visual Studio 2013 中创建新的 Web 项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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