C# - Avoid Building All .NET Projects In A VisualStudio Solution?
Oct 28, 2009
We create a class library and ship C# and VB.NET examples.I have a solution of 60 C# projects. If I make an edit to one of them, Visual Studio only builds the changed one. I have an equivalent solution of 60 VB.NET projects. Visual Studio always builds all 60 projects. Why? Is there a way to force Visual Studio to behave like it does with C# projects?
I should mention that there are no dependencies between the projects.More information: It's not recompiling, really, it's just checking if they need compilation and that takes a significant amount of time.
Here's the build output: Build: 0 succeeded, 3 failed, 58 up-to-date, 0 skipped Those 58 checks take about 30 seconds in my solution of VB.NET projects. This same up-to-date check is almost instant in the solution of C# projects.No edit is necessary. Just switching startup projects is enough.
I have (between others) 2 projects in my solution: one WinForm project, that defines a Form (say, MyFormProject), and other a UserControl (MyControlProject).When I modify MyControlProject's code and launch the debug, I see that any modification is not taken into consideration. I need to clear the solution, rebuild, for make it work...
Additional info: I use in the UserControl the Dbi-Tech Components. Also, in the WinForm I use Infragistics components. Are both license files compatible, cause seems that both should user licenses.licx file?When I wrote a new method in the Control, I got a MissingMethod exception in runtime, however, the code compiled without any error.Then I removed the references, re-added them, and the exception in runtime didn't appear.
I have a .Net solution with 5 projects in c# and one in visual basic. I want to know whether there would be a gain of performance to convert my visual basic project to C# in the day to day while I compile my solution.
I ran into an issue today where VB is behaving differently from C#. The issue is as follows.
Also note this is for .Net 4.0.
Both projects are set to build in release mode Both projects are in the same solution The solution is set to build in release Both projects output to a Release folder in bin / obj
Everything seems to be okay except for one thing. When inspecting the files with a tool such as http://assemblyinformation.codeplex.com/ the VB projects show as Debug and the C# projects show as Release.
I tracked this down to a setting in the Advanced Compiler Options for the pdb files. If the debug info output for VB is set to anything other than none - then the project builds in debug mode (keep in mind it still outputs to the release folder). C# does not exhibit this behavior.
I did a blog post here to work around the issue - but would love to know the root cause if any one knows.
Between testing sessions on my windows service, I'm changing code (little tweaks here and there). For more detailed debugging, I've had the application send messages to a text file everytime it does something (executes a new procedure, catches an exception, etc).
I've been doing this for a while, but ever since yesterday, it appeared that the new code wasn't being used. To test this, I changed the name and location of the log file that the service would use, and re-installed it shortly after a new successful build. As it turns out, the service is writing only 1 message (about a timer being started - which is only supposed to happen after it's logged the start of the service) to the old text file. It looks to me like my service isn't using the new code in my Service1.vb file, Like the old code has been cached or something, and the service is installing from that.
I've developed a stand-alone RTF project/solution and a stand-alone calendar project/solution. I'm trying to incorporate them into a master project/ solution.If I just add the RTF & Calendar projects to the master solution, I cannot access them from the Main form of the master project. It just doesn't see them. Just adding the forms doesn't work because it doesn't contain all of the necessary information embedded in the project (references, etc.)
I have solution that has main app & userManagement app in the main app i referenced the userManagement app and I can see the class in my main app userManagement is a userLogin etc. how can I use the forms from userManagement project in main project??
in formLoad in main app If userID = "" then 'show formLogin from userManagement end if
I am coming to the end of coding this system in Visual Studios 2008 which I took over from a guy who has worked on it for a year.He is not here anymore.He made 9 projects and put them into one solution(screen shot below).I have only published a .NET website for VB and have never published something like this.P3Data is the only one that the publishing tab comes up with. All the other projects the publishing tab does not come up. Why is P3Data bold? How can I publish the whole solution 'P3Data' as one whole entity?
Currently, I have a solution that contains two projects (ASP.net websites, FWIW). If I create a class in Project1, how do I expose it to Project2? Is it automatically available to Project2 because they are in the same solution? Or do I need to do something special to make the connection?
I thought I'd give VB a go after developing with C# for the past few months. I'm using Visual Studio 2008 and have imported the VB IDE settings. I'm going through the same steps in VB as I've gone through in C# to create my solution for an n-tiered ASP.NET web application, but the results are unexpected. Here's the steps:
1. File > New Project > Other Project Types > Visual Studio Solutions > Blank Solution .... name the solution & choose the location ...
2. At this point, I want to proceed to add projects as follows by right-click on the solution in solution explorer
a. Add > Visual Basic > Web > ASP.NET Web Application ... name / location of the Web Client
b. Add > Visual Basic > Windows > Class Library.. name / location of the Business Layer
c. Add > VB > Windows > Class Library ... name / location of the Data Access Layer
BUT, as soon as I complete step 2a, the solution disappears from solution explorer. "Show all files" is selected. This happens regardless of the project I create first.
All too often, when I am looking for sample .NET code to do something and actually find it, it is written in C#. I am by no means proficient with C#... I can read and follow the logic of C# or modify the code, though I have difficulty following along since everything ends in "}".So what do I do? I create a solution with 2 projects. I put the C# code in one project and VB code in the other project. The VB project references the C# project and I modify the C# as necessary so I can call the useful code from the VB project.The current C# code I'm working with is a rather large project. Specifically what it does is handle input from HIDs (specifically I want to use it for input from a media remote).What I wanted to do was leave the C# code pretty much alone and just call a VB subroutine when any HID input is received (many of the remote buttons can't be distinguished from keyboard keystrokes) and process them in VB. Problem is that the VB code also needs access to pieces of the C# code (circular reference). Ideally what I'd want to do is create a VB module within the C# project (since VB.NET and C#.NET are functionally equivalent -- mostly -- though syntactically different). I've used compilers in the past with similar functionality, though I don't know if VS.NET 2008 has this capability. If I just add a module to the C# project, it expects it to be written in C#.If I can't do that, I see 3 options:
1) Write my application in C#
2) Write a new class in C# that exposes the functionality I need, instantiate it in VB
3) Convert all the C# code to VB
These options are beyond my current skillset (except maybe 3), though now is just as good a time as any to learn C#. But this may require more time than I'm willing to invest. I just wanted to create a task launcher / application switcher to be able to switch between music, video, and other players. I, in fact, already have most of the VB code I need from another project, including a DirectX "cover flow" style interface. I just want to add remote control support to it.
I am working on a solution that contains 2 projects one to be built as an exe and the other as a service. Both projects will share a class for certian functions and properties. I would like to have both projects use the same physical file so when I make a change in one of the projects it is also made in the other.
This was simple to do in VB6 but as of yet I see no way to do it under dot net. It seems to want to make a copy of the file and place it into the project folder for the second project resulting in the need to either copy after every change or manually make the changes twice.
Anyone know if there is a way to have common files area for a solution so that any project within the solution has access to the actual file rather than a copy of it?
I have a solution which consists among other things 2 windows applications.I would like to be able to run the first windows application then click on the second windows application and run that as well.
As far as I know , it is possible to combine projects into a solution . So , lets say we have 3 projects . Each project has a starting form , lets call them SF1 , SF2 and SF3 .What I would like to ask you is how can I write code in order to have both the solution and the partial projects , working . You see , the solution (which as far as I know will also be accompanied by a new project) has to have a starting form ; lets call it SF0 .A) First of all I'd like to know how can I call a partial project from the solution itself .B) What code do I have to write in the partial projects in order to keep them running correctly when they are separate (that is not part of the solution) . I am asking this question too , because as I guess , there has to be code in SF1 , SF2 and SF3 (into buttons) that lead back to SF0 , but
I've been doing some lite coding over the last couple years so I'm no where near where a lot of you already are. So my code tends to be organized in the standard beginners format... one project per solution with one executable (*.dll or *.exe). So I have a bit of a "best-practices" question for you... Why use multiple projects in one solution?
Does it exist? Or is there some way to avoid these kinds of compatibility issues without having to have 2 separate components in 2 projects for 2 types of computers?
I've developed a couple of different stand-alone projects, myRibbonRTF and myRibbonCalendar and have them functioning well. I want to tie these together with other projects in a single solution called myMain. When I add these projects to the solution, their forms are not accessible in myMain (e.g. myRibbonRTF.frmMain.Show()). I've searched high and low for the last week trying to solve this and the only nearby solution is to turn the other projects into .dlls and access them in myMain that way.
I'm not sure if this is really a VB IDE issue, or a more general VS10 issue, but I couldn't find any other relevant category to post in, so here goes!I have several VB projects which I want to use in the same solution in Visual Studio 10. I created a project (& corresponding solution) which will reference them and added the existing projects by right clicking the solution in solution explorer choosing 'Add->Existing Project'. Then I went to the containing project's Properties window and added references to the existing projects, so they could be used by the project.
I need to pass data (a user name) from a logon form in one vbproj to a form in another vbproj that are compiled in one solution. Public Read Only does not seem to work.
Just got a little quirk with VS2008 on 1 solution.When i press F5 to debug my solution builds the current project but then insists on building all my setup projects...
This only occurs on 1 of my solutions and it has 20 projects within it.
I've checked startup projects and it has no dependancies and is set to selected project.
EDIT: Right click and debug in new instance works fine
I have 5 projects within the same solution file, Im trying to access a form that is part of one of the projects from my startup project.I have looked through the earlier threads and most of them deal with calling forms from within a project.To my understanding ive correctly added the projects to the solution file from File --> Add --> Existing Projects.I have also referenced my Project2 from Project1 but still the intellisense does not let me access form1 of project2 from project1.
whats the difference between making the sqldatabase outside visualstudio and making it within the project what is better for my web project?whats the coonection string if it is made in visualstudio?
at Microsoft.VisualStudio.DataTools.Interop.IDTTableDesignerFactory.NewTable(Object dsRef, Object pServiceProvider) at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.TableDesignerNode.CreateDesigner(IDT