加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

asp.net – 发布网站项目时Temp路径太长

发布时间:2020-12-15 18:39:37 所属栏目:asp.Net 来源:网络整理
导读:我试图使用 Publish Web Site tool发布一个ASP.NET网站项目,但是得到这个错误: ASPNETCOMPILER(0,0): Error ASPRUNTIME: The specified path,file name, or both are too long. The fully qualified file name must be less than 260 characters,and the d
我试图使用 Publish Web Site tool发布一个ASP.NET网站项目,但是得到这个错误:

ASPNETCOMPILER(0,0): Error ASPRUNTIME: The specified path,file name,
or both are too long. The fully qualified file name must be less than
260 characters,and the directory name must be less than 248
characters.

我看到它正在尝试将文件复制到AppData中的很长的路径中:

Copying all files to temporary location below for package/publish:

C:Usersimx0AppDataLocalTemp1WebSitePublishBMW.Web-424993535objDebugAspnetCompileMergeSource.

c:WINDOWSMicrosoft.NETFrameworkv4.0.30319aspnet_compiler.exe -v /BMW.Web -p C:Usersimx0AppDataLocalTemp1WebSitePublishBMW.Web-424993535objDebugAspnetCompileMergeSource C:Usersimx0AppDataLocalTemp1WebSitePublishBMW.Web-424993535objDebugAspnetCompileMergeTempBuildDir

我的.pubxml发布配置文件中找不到关于此临时目录的任何内容。如何更改Visual Studio将文件复制到的临时目录?

解决方法

将其添加到您的发布配置文件以修改package / publish的临时目录:
<AspnetCompileMergeIntermediateOutputPath>c:shortPath&;/AspnetCompileMergeIntermediateOutputPath>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读