Can't publish v14.1.2
# help-with-umbraco
b
I have 288 errors similar to this one when I try to publish a 14.1.2 site: Error Unable to copy file "C:\Users\REDACTED\.nuget\packages\umbraco.cms.staticassets\14.1.2\staticwebassets\umbraco\backoffice\packages\user\user-group\collection\components\user-group-table-sections-column-layout.element.d.ts" to "C:\Users\REDACTED\repos\app.cc.com.v2.umbraco\app.cc.com.v2.umbraco\obj\Release\net8.0\PubTmp\Out\wwwroot\umbraco\backoffice\packages\user\user-group\collection\components\user-group-table-sections-column-layout.element.d.ts". Could not find a part of the path 'C:\Users\REACTED\repos\app.cc.com.v2.umbraco\app.cc.com.v2.umbraco\obj\Release\net8.0\PubTmp\Out\wwwroot\umbraco\backoffice\packages\user\user-group\collection\components\user-group-table-sections-column-layout.element.d.ts'. app.cc.com.v2.umbraco 0 In this example... C:\Users\REDACTED\.nuget\packages\umbraco.cms.staticassets\14.1.2\staticwebassets\umbraco\backoffice\packages\user\user-group\collection\components\user-group-table-sections-column-layout.element.js ...does exists, but user-group-table-sections-column-layout.element.d.ts does not This was a v14.1.1 site...I updated to v14.1.2 and it runs fine locally after the update, but I can't publish from my local machine to a folder on my server b/c of these errors.
Previously I had a similar issue with v14.1.1 then I found that deleting my bin and obj folders and doing a clean/rebuild solved it...I tried that this time and that did not work
c
I'd have guessed the long path problem given its a lot more common with the .ts files in v14, but then I don't think that usually generates that particular error message. Do you have the Long path support on the machine you're publishing from (assuming building on Windows)?
b
@CodeBunTes i tried the longpath regedit fix when i had this same problem on v14.1.1...that didn't fix it then, but I can try that again i suppose...
@CodeBunTes i toggled the LongPath regedit and rebooted...it published...but now I've got "HTTP Error 500.30 - ASP.NET Core app failed to start" on my server...note: I manually copied the database from my local to my server...I also blew away the Data/Temp folder on my server and replaced it with the Data/Temp folder from my local...
k
Use
dotnet publish
instead, that doesn't need a long-path fix. Turn on ASP.NET stdout logging (or run the app from the command-line) to see what the 500.30 is.
b
@kdx-perbol here's the sdout log Unhandled exception. System.IO.DirectoryNotFoundException: C:\Users\REDACTED\repos\app.cc.com.v2.umbraco\app.cc.com.v2.umbraco\wwwroot\ at Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root, ExclusionFilters filters) at Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsLoader.<>c.b__1_0(String contentRoot) at Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider..ctor(StaticWebAssetManifest manifest, Func`2 fileProviderFactory) at Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsLoader.UseStaticWebAssetsCore(IWebHostEnvironment environment, Stream manifest) at Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsLoader.UseStaticWebAssets(IWebHostEnvironment environment, IConfiguration configuration) at Microsoft.AspNetCore.Builder.ConfigureWebHostBuilder.ConfigureAppConfiguration(Action`2 configureDelegate) at Microsoft.AspNetCore.Hosting.WebHostBuilderExtensions.UseStaticWebAssets(IWebHostBuilder builder) at Umbraco.Extensions.WebApplicationBuilderExtensions.CreateUmbracoBuilder(WebApplicationBuilder builder) at Program.$(String[] args) in C:\Users\REDACTED\repos\app.cc.com.v2.umbraco\app.cc.com.v2.umbraco\Program.cs:line 3 at Program.(String[] args)
k
And does that directory exist?
b
that path is on my local machine...this error is on my server
k
That's strange. Can you verify that there is a
wwwroot
on the server? Is there anything in your project's
wwwroot
to publish?
b
there is stuff to publish
and it looks like it is published
intersting...there's an Umbraco folder in the root folder of my site...there's also one in my wwwroot folder on my server...and it looks like there's one that's been added a level above my site folder onmy server...umbraco folders everywhere
k
I'd clean everything,
dotnet publish
and redeploy and make sure it's the correct folder that's deployed.
b
thx @kdx-perbol i'll try that...may be tomorrow
k
I'm surprised the longpath regedit hack made Publish from VS work for you; it hasn't for others, since the tools used under the hood by VS weren't longpath-enabled anyway. So that's good.
b
@kdx-perbol thank you. i blew away everything on my server, and used dotnet publish. I have the site running now. Thank you for your suggestion!
d
I tried setting longpath in regedit and git but still could not publish using webdeploy, github actions or dotnet publish. I may give this another go.
k
You did actually manage to publish via
dotnet publish
. You just didn't find a reliable way to deploy to an Azure App Service afterwards.
d
True - this was just to an Azure Web App
k
Did you ever end up trying the shortest-possible-path trick and publishing via Publish in VS? I.e., putting the Umbraco project folder in
C:\U\
or similar.
And did you try using the latest VS 2022 Preview?
b
I read in the release notes of v14.2 they addressed the longpath issue "Feature: Force paths to be no longer than 120 characters to support Windows" https://our.umbraco.com/download/releases/1420
32 Views