Open Closed

Publish Error in abp 8.2.0 #7583


User avatar
0
rwright-ruhealth created

Provide us with the following info: ABP Framework version: v8.2.0 UI Type: MVC Database System: EF Core (SQL Server) Tiered (for MVC) or Auth Server Separated (for Angular): NOT tiered Exception message and full stack trace: No Stack trace. Error after running Publish from Visual Studio 2022 C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(112,5): Error NETSDK1152: Found multiple publish output files with the same relative path: C:\abp\MYNewApp\modules\Volo.Account.Pro\src\Volo.Abp.Account.Pro.Public.Web.Shared\Pages\Account_ViewImports.cshtml, C:\abp\MYNewApp\modules\Volo.Account.Pro\src\Volo.Abp.Account.Pro.Public.Web\Pages\Account_ViewImports.cshtml, C:\abp\MYNewApp\modules\Volo.Account.Pro\src\Volo.Abp.Account.Pro.Admin.Web\Pages\Account_ViewImports.cshtml, C:\abp\MYNewApp\modules\Volo.Account.Pro\src\Volo.Abp.Account.Pro.Public.Web\Pages\Account_ViewStart.cshtml, C:\abp\MYNewApp\modules\Volo.Account.Pro\src\Volo.Abp.Account.Pro.Admin.Web\Pages\Account_ViewStart.cshtml.

Steps to reproduce the issue:

NOTE: this application is using ACCOUNT PRO source, IDENTITY PRO source code installed via abp suite.

Create an ABP SUITE application; add the Account pro source and Identity pro sources.Remove the IdentityServer 4 project from the MyNewApp.Web project. in the MyNewApp.Web module file: remove these entries:

[DependsOn(typeof(AbpAccountPublicWebModule))]
[DependsOn(typeof(AbpAccountPublicWebIdentityServerModule))]

Remove Blazor and Maui reference projects added by ABP Suite (not used) Remove the IdentityServer4 Project. Build and correct any remnant references to identityserver4 by removing or commenting out. Build and run the app. Should run fine. PUBLISH the app to a Folder for deployment. Publish for deployment fails with the above errors.


4 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    you need to remove the project reference form .csproj too (identityserver, publicweb)

  • User Avatar
    0
    rwright-ruhealth created

    Hi,

    you need to remove the project reference form .csproj too (identityserver, publicweb)

    I created a fresh project using abp suite and added the Account and Identity sources. I removed the projects that were not needed. I still get a project publish error. IMPORTANT NOTE* I can successfully build and PUBLISH if I don't add the Account and Identity packages in a non-tiered project. In a tiered project or non-tiered project as soon as I add the Account and Identity sources I get a PUBLISH build failed due to the Account resources having the same relative path. This was not an issue in .NET core 5 or 6. Seems to be related to .NET CORE 7 and later. If I exclude from the project, the _viewstart, etc from one of the dup project issues, I can safely publish. Currently, I just make sure the necessary files (at least one with all taghelpers is included in the build). I exclude from the project the others in the path that are causing errors.

    Here are the publish errors and the file contents of _ViewImport and _ViewStart which I included for reference.

    Severity	Code	Description	Project	File	Line	Suppression State	Tool	Details
    Error		Found multiple publish output files with the same relative path: 
    D:\abp\myweb2\MyWeb2\modules\Volo.Account.Pro\src\Volo.Abp.Account.Pro.Public.Web.Shared\Pages\Account\_ViewImports.cshtml, 
    @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
    @addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI
    @addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap
    @addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling
    
    
    
    D:\abp\myweb2\MyWeb2\modules\Volo.Account.Pro\src\Volo.Abp.Account.Pro.Public.Web\Pages\Account\_ViewImports.cshtml, 
    @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
    @addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI
    @addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap
    @addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling
    @addTagHelper *, Owl.reCAPTCHA
    
    
    
    
    D:\abp\myweb2\MyWeb2\modules\Volo.Account.Pro\src\Volo.Abp.Account.Pro.Admin.Web\Pages\Account\_ViewImports.cshtml, 
    @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
    @addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI
    @addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap
    @addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling
    
    D:\abp\myweb2\MyWeb2\modules\Volo.Account.Pro\src\Volo.Abp.Account.Pro.Public.Web\Pages\Account\_ViewStart.cshtml, 
    @using Volo.Abp.AspNetCore.Mvc.UI.Theming
    @inject IThemeManager ThemeManager
    @{
        Layout = ThemeManager.CurrentTheme.GetAccountLayout();
    }
    
    D:\abp\myweb2\MyWeb2\modules\Volo.Account.Pro\src\Volo.Abp.Account.Pro.Admin.Web\Pages\Account\_ViewStart.cshtml.	MyWeb2.Web		0	
    @using Volo.Abp.AspNetCore.Mvc.UI.Theming
    @inject IThemeManager ThemeManager
    @{
        Layout = ThemeManager.CurrentTheme.GetAccountLayout();
    }
    
    
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    you can remove these files.

  • User Avatar
    0
    rwright-ruhealth created

    you can remove these files.

    I had already done this step to get it working. However, I was concerned about side effects of removing the files. Thank you. That was my main concern.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 18, 2024, 05:54