Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NuGet Packages don't work on non-Windows systems #1002

Closed
robinmanuelthiel opened this issue Oct 2, 2018 · 10 comments

Comments

@robinmanuelthiel
Copy link
Member

commented Oct 2, 2018

Version

4.0.6

Describe the bug

I can't use the latest release of the Bot Build SDK on macOS. Previous versions of v4 worked fine, but the latest ones do not compile. Both, after downloading the Bot Code from an Azure Bot Service, creating a Bot from a Template in Visual Studio 2017 on Windows or Creating a brand new ASP.NET Core project throw compilation errors when the NuGet packages were added.

image

On Windows, everything works fine. As .NET Core is cross platform, all samples and templates as well as the NuGet packages need to work cross-platform!

To Reproduce

Variant 1

  1. Create a new C# Bot in the Azure Portal
  2. Once created, navigate to the "Build" Section
  3. Download the source code
  4. On a Mac, navigate to the folder in the Terminal and run dotnet build

or

Variant 2

  1. On a Mac, create a new ASP.NET Core project with dotnet new web
  2. Open the project in an IDE and add the Microsoft.Bot.BuilderNuGet packages version 4.0.6
  3. Open the project's Startup.cs class
  4. Add a using Microsoft.Bot.Builder; reference
  5. Compile with dotnet build

Logs

Build FAILED.

EchoBotAccessors.cs(5,17): error CS0234: The type or namespace name 'Bot' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [/Users/robinmanuelthiel/Downloads/RothieDemoBotApp-src 3/EchoBotWithCounter.csproj]
EchoWithCounterBot.cs(6,17): error CS0234: The type or namespace name 'Bot' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [/Users/robinmanuelthiel/Downloads/RothieDemoBotApp-src 3/EchoBotWithCounter.csproj]
EchoWithCounterBot.cs(7,17): error CS0234: The type or namespace name 'Bot' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [/Users/robinmanuelthiel/Downloads/RothieDemoBotApp-src 3/EchoBotWithCounter.csproj]
Startup.cs(8,17): error CS0234: The type or namespace name 'Bot' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [/Users/robinmanuelthiel/Downloads/RothieDemoBotApp-src 3/EchoBotWithCounter.csproj]
Startup.cs(9,17): error CS0234: The type or namespace name 'Bot' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [/Users/robinmanuelthiel/Downloads/RothieDemoBotApp-src 3/EchoBotWithCounter.csproj]
Startup.cs(10,17): error CS0234: The type or namespace name 'Bot' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [/Users/robinmanuelthiel/Downloads/RothieDemoBotApp-src 3/EchoBotWithCounter.csproj]
Startup.cs(11,17): error CS0234: The type or namespace name 'Bot' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [/Users/robinmanuelthiel/Downloads/RothieDemoBotApp-src 3/EchoBotWithCounter.csproj]
Startup.cs(12,17): error CS0234: The type or namespace name 'Bot' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [/Users/robinmanuelthiel/Downloads/RothieDemoBotApp-src 3/EchoBotWithCounter.csproj]
EchoWithCounterBot.cs(23,39): error CS0246: The type or namespace name 'IBot' could not be found (are you missing a using directive or an assembly reference?) [/Users/robinmanuelthiel/Downloads/RothieDemoBotApp-src 3/EchoBotWithCounter.csproj]
EchoWithCounterBot.cs(59,39): error CS0246: The type or namespace name 'ITurnContext' could not be found (are you missing a using directive or an assembly reference?) [/Users/robinmanuelthiel/Downloads/RothieDemoBotApp-src 3/EchoBotWithCounter.csproj]
EchoBotAccessors.cs(40,16): error CS0246: The type or namespace name 'IStatePropertyAccessor<>' could not be found (are you missing a using directive or an assembly reference?) [/Users/robinmanuelthiel/Downloads/RothieDemoBotApp-src 3/EchoBotWithCounter.csproj]
EchoBotAccessors.cs(46,16): error CS0246: The type or namespace name 'ConversationState' could not be found (are you missing a using directive or an assembly reference?) [/Users/robinmanuelthiel/Downloads/RothieDemoBotApp-src 3/EchoBotWithCounter.csproj]
EchoBotAccessors.cs(22,33): error CS0246: The type or namespace name 'ConversationState' could not be found (are you missing a using directive or an assembly reference?) [/Users/robinmanuelthiel/Downloads/RothieDemoBotApp-src 3/EchoBotWithCounter.csproj]
    0 Warning(s)
    13 Error(s)

[bug]

@JasonSowers

This comment has been minimized.

Copy link
Contributor

commented Oct 3, 2018

I just tested this and was able to have success, here are the steps I followed.

  1. Created a new ASP.NET core Web App project by going file>new solution
  2. In the startup.cs file I added Using Microsoft.Bot.Builder;
  3. Right click on the Nuget folder in the solution and select add packages
  4. Find and select Microsoft.Bot.Builder and click add package
  5. Right click the dependencies folder and select add packages

I was able to build with no issues after following these steps.

@lynn-orrell

This comment has been minimized.

Copy link

commented Oct 3, 2018

I can try to repo this on a new project but when downloading from the portal, the project is definitely broken. You can't just restore and build without getting the errors in the OP.

@robinmanuelthiel

This comment has been minimized.

Copy link
Member Author

commented Oct 3, 2018

I can confirm, that it workes with the 4.0.7 version of the Microsoft.Bot.Builder NuGet packages. The 4.0.6 packages do not work on macOS. As the Visual Studio Templates and the Azure Projects both are still on 4.0.7, I would highly recommend to update them!

Can be closed.

@benbrown benbrown added this to the 4.1 milestone Oct 3, 2018

@JasonSowers

This comment has been minimized.

Copy link
Contributor

commented Oct 3, 2018

@robinmanuelthiel and @lynn-orrell the packages will be updated in our next release so this should not be an issue moving forward. You can also find all the templates for v4 in our botbuilder-samples repo and use those to start with rather than a template if you wish. They are all updated to 4.0.7. I prefer starting bot projects this way personally so maybe try that out.

@JasonSowers JasonSowers self-assigned this Oct 3, 2018

@robinmanuelthiel

This comment has been minimized.

Copy link
Member Author

commented Oct 4, 2018

Sounds good. @JasonSowers, any plans to update the code that get "generated" by the Azure Portal as well soon?

@lynn-orrell

This comment has been minimized.

Copy link

commented Oct 4, 2018

Thanks, @JasonSowers ! Sorry for the late response, got everyone rolling yesterday after upgrading packages to 4.0.7. Looking forward to the new version rollout!

@JasonSowers

This comment has been minimized.

Copy link
Contributor

commented Oct 4, 2018

@robinmanuelthiel yes, that what I meant would be updated in the next release. I should have been more clear. The next release I was referring to was a release for the Azure portal. I would expect the templates on the Azure portal will be updated this week or next (please don't quote me on this). I double checked with the team that owns the templates in Azure and have seen for myself they have been updated to 4.0.7 and are just waiting to be deployed 👍

@JasonSowers JasonSowers closed this Oct 4, 2018

@robinmanuelthiel

This comment has been minimized.

Copy link
Member Author

commented Oct 12, 2018

That would be great because, on non-windows machines, the portal is the only way to create a new Bot project, as there are no templates for Visual Studio for Mac or the dotnet command line. And even this (and only way for non-windows) does not work on non-windows devices. So we are pretty much stuck at the moment.

@reddyavinash5

This comment has been minimized.

Copy link

commented Oct 26, 2018

I get 268 errors in VS2017 using sdk 4. I used microsoft's samples from github but still its the same 'BOT' doesn't exist, and many other namespaces do not resolve. I tried with 4.0.6, 4.0.7, 4.0.8 nothing works.@JasonSowers any idea ?

@jwiley84

This comment has been minimized.

Copy link
Member

commented Oct 29, 2018

Hi @reddyavinash5! This appears to be a separate issue from the above described problem. Can you please open a new issue on the repo so we can better assist you?

@yochay yochay removed this from the 4.1 milestone Oct 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.