When I deploy my project with "Publish as Azure WebJob" using Visual Studio 2013/update 4, I get the error in the title.
Fixed by removing the following markup from the .pubxml file. You must exit/restart VS after removing the markup (or VS will add it back in).
<ItemGroup> <MSDeployParameterValue Include="$(DeployParameterPrefix)DefaultConnection-Web.config Connection String" /> </ItemGroup>
Reason of the problem is one of the followings:
web.config
.web.config
Solution
Press the settings link and from the pop-up window select the 'Settings' Tab
Uncheck the use this connection string at runtime
from all your connection strings.
Save
button to close the window. (No need to restart Visual Studio)NOTE
I am using VS 2017 (and according to the comments this also work in Visual Studio 2013)
Just for Note
After I did the previous steps, I noticed that the .pubxml file changed automatically. here is the difference which has been made (automatically without any interference from me)
So I think this is a better way because it is easier for the developer and also it let the visual studio to solve its problems himself, without forcing it into a specific thing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With