Answer the question
In order to leave comments, you need to log in
VS 10/12 project: is it possible to add *.cs as a link in read-only mode
Good afternoon
, there are two VS projects that are not combined into one solution.
The second project needs some .cs from the first project.
I have added these files as a link.
Everything is great, but I need it so that when working in the second project, there is no way to change anything in the code from the first project - that is, the links should be in read-only mode. At the same time, in the first project, it should be possible to edit everything.
Is it possible to organize this by any simple means - maybe there is something built into the studio
Answer the question
In order to leave comments, you need to log in
What prevents you from pulling them into a separate assembly and connecting them to both projects?
Everything is correct in the previous answer.
Your problem should not arise - most likely it is just the smell of real problems - problems of high-level architecture and deployment system.
And these problems will definitely come up again - your crutches will not save you.
Do like all normal people - operate with classes and namespaces rather than files and take out the common parts in a separate project.
If you have to solve some serious application problems along the way, solve them.
In particular, if the assembly is used in other programs, fix its external interface as a facade and change the internal implementation to call code from other assemblies. There will be an extra reason to cover with tests.
Or figure out the system for deploying this assembly into application data.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question