Download Source Code from Azure
Bot Info
- SDK Platform: .NET
- Active Channels: Direct Line
- Deployment Environment: Azure App Service
- MicrosoftAppId: a9846b9a-f1b4-4849-9103-28fd761ee633
Issue Description
I'm using VS to develop the bot. I've downloaded the code in the beginning of the development and I publish the code everytime I want to change something.
The problem is that when I try to download the code from Azure using the Download Source Code option, the version downloaded is not the actual version, it's a old version almost from the beginning of the development.
Reproduction Steps

Expected Behavior
Last version of code.
Actual Results
Old version of the code.
PS. I think this will be a problem when I try to migrate the bot.
Hi luisnatividade,
Try rebuilding the source code online using build.cmd and download the source code again.
Hi @FranciscoPonceGomez thanks for the response.
I've done that and didn't work. Still an old version when I download the source code.
Below it's a print of the console.

I had the same issue, It turns out that if you updated the nuget packages, the online editor doesnt accept Microsoft.Net.Compiler version greater than 1.2.1 and Microsoft.CodeDom.Providers.DotNetCompilerPlataform version 1.0.1.
I downloaded the version as you did from the azure service right from the beginning and I didnt updated at all, it work well as long as i dont try to add LUIS services, because then i begin to have "Issue code messages"
And if you try to downgrade all your nuget packages as it was default download source code, it remains broken. believe me I've tried!!!
@Quico20 I have Microsoft.Net.Compiler version 1.2.1 and Microsoft.CodeDom.Providers.DotNetCompilerPlataform version 1.0.1
@FranciscoPonceGomez any solution to this? I tried to migrate the bot but the old code version was migrated. I had to roll back...
I will report this and check if there is a workaround. I will get back to you soon. Thanks for reporting this @Quico20
@FranciscoPonceGomez your welcome, I was able to finished my Bot Framework course, I successfully made my bot worked, but upgrading everything except the libraries mentioned before!! I'm glad to help!!
@FranciscoPonceGomez any update on this? I'm currently unable to migrate the bot...
Thanks.
We are working on the issue right now. I will get back to you as soon as I have a fix.
Can you check if your .csproj file is missing the source targets? It should be at the bottom of the file.
<Import Project="PostDeployScripts\IncludeSources.targets" Condition="Exists('PostDeployScripts\IncludeSources.targets')" />
<Import Project="..\PostDeployScripts\IncludeSources.targets" Condition="Exists('..\PostDeployScripts\IncludeSources.targets')" />
</Project>
I was able to reproduce the issue by commenting these two lines. If manually or automatically any of these lines have been modified or removed the publish doesn't actually affect the target sources.
Francisco
@FranciscoPonceGomez instead of those lines i had
<Import Project="PostDeployScripts\IncludeSources.targets" />
But I put the lines you sent and it did not solve the problem.
I'm not sure, but I think in the beginning the console wasn't with "master". (Check the image below).

I'm not sure if this can be related to the problem.
Thanks in advance.
We are looking into this. Thanks for your patience.
Can you send me your code? If not here, please send it to my work address "[email protected]"
Thanks, Francisco
@luisnatividade Are you able to share the code?
@FranciscoPonceGomez @EricDahlvang I can't send the code due to company restrictions. But I can share some specific files if you want.
Thanks.
Please email @FranciscoPonceGomez or myself the .csproj file
@EricDahlvang file sent.
Thanks.
Please try downloading the source again, and overwrite your project’s PostDeployScripts folder with the downloaded version. Then, go through these steps to publish:
In Visual Studio, right click on {PROJ_NAME} and select 'Publish'
- In the publish profiles tab, click 'Import'
- Browse to 'PostDeployScripts' and pick '{SITE_NAME}.publishSettings'
I've done that right now and did not solve the issue.
The {SITE_NAME}.publishSettings (inside PostDeployScripts folder) has 18/01/2018 as the last date modified. Don't know if it is supposed to be like that or not.
Thanks.
Something you could try is to create a brand new web app bot, download the source, and compare the project and PostDeployScripts to the one that is not working.
@luisnatividade Have you tried comparing a newly downloaded web app bot's PostDeployScripts and project to the one that is having issues?