I am publishing asp.net web application in local folder. While publishing in visual studio 2019, it copies all the file in temp folder which is default at C:UsersusernbameAppDataLocalTempWebSitePublishdtl–928119786objDebugPackagePackageTmppackagesMicrosoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1buildnet45Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Extensions.props
This folder path is too long and I get this error:
Severity Code Description Project File Line Suppression State Error Copying file
packagesMicrosoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1buildnet45Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Extensions.props to C:UserssapdhassAppDataLocalTempWebSitePublishdtl_development_python–928119786objDebugPackagePackageTmppackagesMicrosoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1buildnet45Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Extensions.props failed. 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.
I tried different solution by changing Folderprofile.pubxml file but none of these are working. This solution looked promising but again it didn’t work for me https://forums.asp.net/t/1944241.aspx?Website+publish+failing+due+to+file+path+being+too+long
Can you please help me in understanding how to change this temporary path in VS 2019?