We have an blazor-webassembly project and an referenced blazor-library (BlazorLib):
The client project references the BlazorLib:
There is an Javascript file called blazorLib.js which is compiled by typescript´s file blazorLib.ts:
The Target:
We want do publish the solution via the following command line:
dotnet build "Performancelog\Server\PerformanceLog.Server.csproj" /p:DeployOnBuild=true /p:PublishProfile="NewRelease"
The Problem:
When the command is completed, then in the output-folder, the src-folder and containing file blazorLib.js are missing:
Question:
How can we include the file src/blazorLib.js into the published output folder?
Here are some further information:
The file properties of the blazorLib.js file:
The tsconfig.json file:
{
"compileOnSave": true,
"compilerOptions": {
"module": "CommonJS",
"removeComments": true,
"sourceMap": true,
"outDir": "src"
},
"include": [
"./**/*"
]
}
The publish profile:
We tried it with dotnet publish and also the src/blazorLib.js file is missing:
dotnet publish $PathToProject --configuration Release -f net5.0 -o "$PathToOutput" --self-contained true --runtime win-x64
When we use the publish-function in Visual Studio, then the file src/blazorLib.js existst in the output folder. That is curious. But we want to use the command line.
from Missing typescript compiled javascript file of an referenced library in my output folder when publishing via console command






No comments:
Post a Comment