botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

Download Source Code from Azure

Open luisnatividade opened this issue 8 years ago • 21 comments

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

image

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.

luisnatividade avatar Mar 08 '18 16:03 luisnatividade

Hi luisnatividade,

Try rebuilding the source code online using build.cmd and download the source code again.

FranciscoPonceGomez avatar Mar 09 '18 16:03 FranciscoPonceGomez

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.

image

luisnatividade avatar Mar 09 '18 17:03 luisnatividade

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 avatar Mar 09 '18 23:03 Quico20

@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...

luisnatividade avatar Mar 12 '18 09:03 luisnatividade

I will report this and check if there is a workaround. I will get back to you soon. Thanks for reporting this @Quico20

FranciscoPonceGomez avatar Mar 12 '18 21:03 FranciscoPonceGomez

@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!!

Quico20 avatar Mar 15 '18 00:03 Quico20

@FranciscoPonceGomez any update on this? I'm currently unable to migrate the bot...

Thanks.

luisnatividade avatar Mar 16 '18 13:03 luisnatividade

We are working on the issue right now. I will get back to you as soon as I have a fix.

FranciscoPonceGomez avatar Mar 16 '18 21:03 FranciscoPonceGomez

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 avatar Mar 19 '18 22:03 FranciscoPonceGomez

@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).

image

I'm not sure if this can be related to the problem.

Thanks in advance.

luisnatividade avatar Mar 20 '18 17:03 luisnatividade

We are looking into this. Thanks for your patience.

FranciscoPonceGomez avatar Mar 28 '18 17:03 FranciscoPonceGomez

Can you send me your code? If not here, please send it to my work address "[email protected]"

Thanks, Francisco

FranciscoPonceGomez avatar Mar 29 '18 21:03 FranciscoPonceGomez

@luisnatividade Are you able to share the code?

EricDahlvang avatar Apr 04 '18 05:04 EricDahlvang

@FranciscoPonceGomez @EricDahlvang I can't send the code due to company restrictions. But I can share some specific files if you want.

Thanks.

luisnatividade avatar Apr 04 '18 08:04 luisnatividade

Please email @FranciscoPonceGomez or myself the .csproj file

EricDahlvang avatar Apr 04 '18 16:04 EricDahlvang

@EricDahlvang file sent.

Thanks.

luisnatividade avatar Apr 04 '18 16:04 luisnatividade

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'

  1. In the publish profiles tab, click 'Import'
  2. Browse to 'PostDeployScripts' and pick '{SITE_NAME}.publishSettings'

EricDahlvang avatar Apr 04 '18 20:04 EricDahlvang

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.

luisnatividade avatar Apr 05 '18 08:04 luisnatividade

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.

EricDahlvang avatar Apr 11 '18 22:04 EricDahlvang

@luisnatividade Have you tried comparing a newly downloaded web app bot's PostDeployScripts and project to the one that is having issues?

EricDahlvang avatar Apr 25 '18 16:04 EricDahlvang