Invisible VB.NET code

Status
Not open for further replies.

NorrecV

Ars Scholae Palatinae
774
I've been working on a project on and off and it's gotten to the stage where coworkers are wanting to view my code. I copied the entire project folder onto the network and assumed they'd be able to open and view the files the same as I can. However, whenever someone tries to open the 'Microsoft Visual Studio Solution' file it comes up but the code window is blank. When you press F5 the invisible code will still run, but I can't find any way to make the code actually appear. Right clicking on the file in 'Solution Explorer' and hitting 'View Code' does go to the code window but doesn't make the code any less invisible.

This is the first time I've worked with VB.NET or Visual Studio 2010. I was expecting the project iself to be the hard part, but so far it's VS2010 thats caused all the problems so far. I'm thinking this is some sort of copy protection or run-only setting that I haven't turned off when I save it. Is anyone familiar with this issue or have ideas on a fix?

Note that this is happening on my coworkers copy of VS2010 and my own if I try and open any version of the file other than the original. This even happens if I copy the folder, paste a new one on the desktop, and try to open it. I thought it might be something with opening the file over the network but it seems any form of copy-paste causes this.

I've tried going to 'Open Project' and opening the project file itself but the code is still invisible. Even going to 'Open File' and opening the source file the code is invisible.
 

jxl

Ars Praefectus
5,020
Why are you not using source control of some sort? That's something you need to do before anything else.

People could be running a solution with code that they can't see if it's referencing DLLs. I seem to remember VS.Net having some goofy issue with opening projects on network shares (because they represent a security risk?), but my development's all been on my local machine for a long while now, so that could be another thing to make sure you're not doing.
 

NorrecV

Ars Scholae Palatinae
774
The company uses source control for everything else, but this was just a project they gave me when I hinted at having nothing to do. When I coded in C and Java I could send my code to anyone, they could open it in any IDE they wanted, and the code would be there. I'm not used to it being locked like this.

I had suspected something involving DLLs but my code doesn't use any of them as far as I'm aware, unless System.XML is one? Is my code being treated as a DLL when the project file goes to open it? Is there a way to undo this?

For now I'm just having them do 'Open File' on the Visual Basic Source File. This brings up the code but you can't run it. If they want to run it they have to use the application file or the invisible code project.
 

svdsinner

Ars Legatus Legionis
15,152
Subscriptor
NorrecV":3qt93mcg said:
The company uses source control for everything else,
Just make a one-off GIT for Windows repository for it, and write a quick doc to explain to any consumers of the code how to install git and clone the repository on their local machine.

IMHO, that is the magic of GIT: it is so easy to setup new server-less repositories and clone them however you'd like that it is a perfect fit for minor projects like this.

I'm guessing that the issue is related to running the source code off a network share, and some simple scheme (like GIT above) that gets the source code onto local machines will solve your issue.

As an added benefit***, you can setup a Git "Master" copy that you let people copy/clone from, while maintaining your own development copy so you can make sure the others only can download good quality builds. (Which will save you time explaining why intermediate builds have non-complete features that don't work. You'd only merge back to Master when a milestone is complete, but could still do hourly or daily personal check-ins.)

***Not necessary, just a nice feature you can use if you want.
 
Status
Not open for further replies.