Hi, I have setup a continuous integration in VSTS and all is working fine and the web app is published successfully. However, I noticed that in the files that were published into Azure, there is only 1 appsettings.json file. This is the one for the Public website rather than for the backend one (Web.Host).
What shall I do? How could I publish the Web.host and Web.public to two different web apps so that each web app gets its own copy of the appsettings.json?
Thanks
9 Answer(s)
-
0
For anyone in the same situation as mine. I found a way out.
In the VSTS Build Definition, select .csproj instead of .sln. This way, only the project you want to build, will be built, others won't!
This works like a charm. If you need help while doing this step, ping me here. I will be glad to help.
Thanks Bilal
-
0
Thanks @bilalhaidar.
-
0
Did you ever run into an issue where the build fails? Can you screen shot your build steps?
I get this random error that makes no sense. Could not copy the file "\.\nul" because it was not found
-
0
Hi all, What kind of build definition template are you using? I'm using Visual studio online(VSO) and i tried with 2 provided templates (ASPNetCore & ASPNetCore(.Net Framework)) and all builds were failed when i tried to build only Host project. Can you help me please? maybe with some images ? I think that my error is in the paths, when i get source from Host instead of All.sln and build path is .csproj instead of wildcard(**/.csproj), and I tried many unsuccessful options.
Thanks, ;)
-
0
write the command that you are running? and the exception
-
0
Hi alper, I run a build definition template for asp.net core, you can see the exception on the images attached. [attachment=1:2njvdku6]2018-06-01_09h13_32.png[/attachment:2njvdku6] [attachment=0:2njvdku6]2018-06-01_09h16_26.png[/attachment:2njvdku6]
As you can see I build successfully ( when I build a *.sln , all projects) but I can`t when I try to build only the Host project. This is my problem
-
0
@Ignasi is the Nuget Restore step works on the sln file or on the Host.csproj file ?
-
0
-
0
Solved! GetSources from */All.sln Nuget Restore path from *.sln Build path from **/myprojectName.Web.Host.csproj
Thanks!