I am trying to access the My.Computer object in a class library project (Visual Studio CE). I know people say that I should find in Project Properties a "My Extensions" option - but it's just not there.

Microsoft site says the exact same thing but I just can't find that option. To access the My Extensions page, double-click My Project for your project node in Solution Explorer. When the Project Designer appears, click the My Extensions tab.

https://docs.microsoft.com/en-us/visualstudio/ide/reference/my-extensions-page-project-designer-visual-basic?view=vs-2017

Besides that, Microsoft says the My.Computer should be available in Class Library project. Well, it's not. As a matter of fact My is totally empty.

https://docs.microsoft.com/en-us/dotnet/visual-basic/developing-apps/development-with-my/how-my-depends-on-project-type

LE:

  • Visual Studio Community 2017 15.8.1

  • .NET Framework 4.6.01055

  • Class Library type: .NET Standard

ANSWER: .NET Standard Class Library does not have My extensions. Use .NET Framework Class Library when creating the project to be able to access My objects.

New contributor
brakaduun is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • Which version of Visual Studio are you using? Which class library project did you create: Class Library (.Net Standard) or Class Library (.Net Framework)? – Chris Dunaway yesterday
  • Answer in main post, thanks. – brakaduun yesterday
  • Try using Class Library (.Net Framework) instead. When I created one using .Net Standard, it did not have the My Extensions tab, but creating one using .Net Framework did. I'm not sure why there is a difference. – Chris Dunaway yesterday
  • @Chris Dunaway - thank you I have solved the mystery! In .NET Standard framework, the .net 1.4 version was used -> probably why My was empty. I have created a .NET Framework Class Library and works fine. So many thanks. – brakaduun yesterday
  • We were writing in the same time :) - thanks again. – brakaduun yesterday

Your Answer

brakaduun is a new contributor. Be nice, and check out our Code of Conduct.
 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.