VS Installer
VS Installer

Reputation:

Debug or build as non-admin in Visual Studio 2008

I am trying to install Visual Studio 2008 at a university's computer lab. The lab machines (XP Pro) are configured so that students don't have Administrator rights when they log in. So when I try to build or debug a class library project in Visual Studio 2008, I get this error: "Cannot register assembly 'C:\Documents and Settings(username)\My Documents\Visual Studio 2008\Projects\testproj\testproj\bin\Debug\testproj.dll' - access denied. Please make sure you're running the application as administrator. Access to the registry key 'HKEY_CLASSES_ROOT\test.cmdTest' is denied."

In previous versions of Visual Studio, there was the option to add the non-admin account to the Debugger Users and VS Developers groups, and this would enable them to debug and build DLLs. Does Visual Studio 2008 include similar functionality, and would this even be the solution? I'm not seeing the groups added with the installation. If this functionality is not included, is there another way to solve this issue? Allowing students to have Admin rights or Power User rights to the machines is out of the question.

Any suggestions, ideas, or insight would be much appreciated.

Upvotes: 9

Views: 6897

Answers (4)

Preet Sangha
Preet Sangha

Reputation: 65555

It looks like you're trying to register the assembly in COM.

Access to the registry key 'HKEY_CLASSES_ROOT\test.cmdTest' is denied."

Are you setting a [assembly:ComVisibleAttribute(true)] attribute in your assemblyinfo.cs or project properties? Try setting this to assembly:ComVisibleAttribute(false).

Upvotes: -1

ZeroCool
ZeroCool

Reputation: 1500

Why not just consider using some kind of virtualizations ? Install Visual Studio on a virtual machine, hence, every mess a student gonna make, is gonna be virtual to some extent.

Keep a ready and fresh copy of the image file though.

Upvotes: 2

user29117
user29117

Reputation: 87

Are you doing a web application? I believe that for non-web applications, you do not need admin rights.

If this is not a web application, maybe it's just a file system permissions issue?

From:

http://msdn.microsoft.com/en-us/library/ms165100.aspx

"User permission requirements for Visual Studio vary depending on the operating system and the Visual Studio version. On Windows Vista, Visual Studio 2008 does not require administrator permissions to perform most tasks, but Visual Studio 2005 must run under administrator permissions to perform tasks correctly. On Windows Server 2003 and earlier, members of the Users group can perform most activities in the integrated development environment (IDE)."

Upvotes: 1

Andrew Magill
Andrew Magill

Reputation: 2508

Probably not the answer you want, but you could start VS by right clicking VS2008/devenv.exe > "run as" and select administrator and have the lab tech enter the admin credentials. This way, VS2008 will have the required rights, but your school isn't giving out a sensitive Login/Password.

Your school should change the group policy to allow you to build your projects. Enlist the help of a friendly professor for that.

Upvotes: 1

Related Questions