Question

We are using VS 2012 with TFS 2012. We want to prevent some users to view particular source files in a project, We know how do this,Actually by right clicking on the files on the source control window and manage permissions in security tab. The problem is that when we prevent a user to view or change a file such as HomeController.cs the user can't build the project and the vs IDE says that the file does not exist,

How we prevent access a file with the ability of successful building project for the user

Was it helpful?

Solution

If you prevent read / view permission then how can the compiler access the file in order to build it? If the compiler can see the file then so can the user.

Are you sure that you want to prevent these users from even seeing the file, or do you just want to prevent them from changing the files? If it's the latter then you can simply remove the permission to check-in.

OTHER TIPS

There is another avenue that may be of use in your situation. Split the project up into libraries and only combine all the libraries on the build server.

The developer can build but not run on their machine. With gated check-ins the build is made available.

This works especially well if the project is web based and the build server deploys the assemblies to a web server that the developer can view.

Otherwise the notes on obfuscation and decompiling stand.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top