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

Create a .NET class library using Visual Studio, Visual Basic Build Error #40155

Closed
gewarren opened this issue Mar 20, 2024 · 5 comments
Closed
Assignees
Labels
dotnet-fundamentals/svc okr-quality Content-quality KR: Concerns article defects (bugs), freshness, or build warnings. 📌 seQUESTered Identifies that an issue has been imported into Quest.

Comments

@gewarren
Copy link
Contributor

gewarren commented Mar 20, 2024


Issue moved from MicrosoftDocs/feedback#3994


From @james-a-maher on Thursday, March 14, 2024 12:27:52 PM

Good afternoon,

When following this tutorial using the Visual Basic option, I have received the following error in building the solution:

BC30456: 'StartsWithUpper' is not a member of 'String'

I have pasted the code in from the tutorial, therefore the function has been defined as an extension. I have also added the library as a project reference in the application.

I am working in Visual Studio 2022, in Windows 11, in Parallels, on an M1 MacBook Air.

To reproduce this error, simply follow the Visual Basic version of the tutorial. This seems to be the same problem as was reported in #12517.

Please find attached screenshots of the state of play.

Any help which you can provide would be much appreciated, and I apologise in advance if there is any error on my part.

Yours faithfully,
James Maher

Screenshot 2024-03-14 at 11 40 57 Screenshot 2024-03-14 at 11 41 22

Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.


Associated WorkItem - 232970

@gewarren
Copy link
Contributor Author

gewarren commented Mar 20, 2024


Issue moved from MicrosoftDocs/feedback#3994

  • Please respond to @WELCOME[███].

From @WELCOME[███] on Thursday, March 14, 2024 12:27:55 PM

Thank you for opening an issue! One of our team members will get back to you with additional information.

If this is a product issue, please close this issue and contact the product's support instead. For a list of support websites, see Support for Microsoft products and apps.

Note

This content was automatically updated to filter out profanity. If you feel as though this was done in error, please file an issue with the details.

@gewarren
Copy link
Contributor Author


Issue moved from MicrosoftDocs/feedback#3994


From @kamalkimo887 on Monday, March 18, 2024 4:29:40 AM

Can I help retrieve the main emails, knowing more than the emails, I was not able to retrieve it

@gewarren
Copy link
Contributor Author


Issue moved from MicrosoftDocs/feedback#3994


From @james-a-maher on Monday, March 18, 2024 9:28:48 AM

Can I help retrieve the main emails, knowing more than the emails, I was not able to retrieve it

Regrettably, I don't understand what you mean. Have you replied to the right thread?

@tdykstra
Copy link
Contributor

tdykstra commented Mar 21, 2024

@james-a-maher [Edited comment] The tutorial is out of date, but not in a way that causes this problem. It tells you to clear out the Root Namespace but the Properties panel no longer has that field. The UI now has a Default namespace field, which maps to Root namespace in the project file.

At first when I went through the tutorial I got results like yours, and changing the Imports statements fixed it once. But on subsequent times going through the tutorial taking care to do everything exactly as directed, it has been working correctly with no changes.

The solution in GitHub from which the tutorial gets the code it displays is here:

https://github.com/dotnet/docs/tree/main/docs/core/tutorials/snippets/library-with-visual-studio/vb

(The only difference is the addition of a test project.) You can download it and run it, and it compiles without error. And you can compare the .vbproj and .vb files to see where what you have is different. If you can't see any differences but your code still doesn't work, you're most likely to get a timely response by posting a question in a support forum like Stack Overflow.

@tdykstra tdykstra added doc-bug 🗺️ reQUEST Triggers an issue to be imported into Quest. and removed ⌚ Not Triaged Not triaged labels Mar 21, 2024
@dotnet-policy-service dotnet-policy-service bot added the okr-quality Content-quality KR: Concerns article defects (bugs), freshness, or build warnings. label Mar 21, 2024
@sequestor sequestor bot added 📌 seQUESTered Identifies that an issue has been imported into Quest. and removed 🗺️ reQUEST Triggers an issue to be imported into Quest. labels Mar 21, 2024
@james-a-maher
Copy link

Good afternoon Tom,

Thank you very much for your response. Following your instructions has fixed the issue; the problem was caused by my failing to delete the default namespace of the StringLibrary project. For those finding this thread in future, I have attached screenshots showing what the interface now looks like, and one can see highlighted what needs to be deleted. The same can also be achieved by deleting the contents of the RootNamespace tag in the project file for StringLibrary.

Best wishes,
James Maher
Screenshot 2024-03-21 at 14 19 27
Screenshot 2024-03-21 at 14 19 53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dotnet-fundamentals/svc okr-quality Content-quality KR: Concerns article defects (bugs), freshness, or build warnings. 📌 seQUESTered Identifies that an issue has been imported into Quest.
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

4 participants