I am three class libraries in my windows application project. And now i want to create setup file for my project. So what i did is, just create a new setup project and added my solution file. But it adds only Forms classes. so i manually added all remaining 3 class libraries by right on the setup's solution, clicked add existing project then browsed my class library. And builded the project got the exe file.
when i try to open the installed application it saying that missing dll in the project.
In your Setup project you need to include Content files as well as Primary output for the Windows project.
An example of adding files can be found HERE
Related
I can't get the Application Configuration File template to show up under my Add > New Item > Visual C#. I've run a repair. I've uninstalled and reinstalled. I've deleted and added Cache folders. I've run devenv.exe /InstallVSTemplates. Nothing is working.
If anyone can tell me specifically what installation elements I should be including, and specifically what type of Project I need to start that might help.
I want to create a simple .Net Web Form in .Net and C# and need to include an app.config file.
When you create a new project (depending on the type of project like a web application for example) it will automatically create a template app.config file.
Worst case just make a txt file in notepad and call it [Appname].config
Another way would be to go in the project properties, then the Settings tab. If there are no settings yet, a link should exist in the middle of the empty tab to create a default setting file. Add one Application or User setting and save. Among other things a config file will be created for you too.
I would like to add a console app as a reference to an asp.net project. Ideally I want them in the /bin folder (or in a sub folder in the web/output folder). Unfortunately, adding the console app as a reference will put the build output in /bin of the web project, but it will not generate the App.config file.
Does anyone know the proper way to include a console app in the build/publish process of an asp.net project?
Thank you,
Adding it as a reference will affect compilation, which is not what you want.
Instead, you should add a build step (to either project) to copy the EXE & config file to a directory of your choice.
You should also edit the solution to add the EXE as a dependency of the web project to make sure it builds first.
I am working on a solution that contains 30 cs projects. I am focusing on only 1 project so I preferred to open only this specific project.
Once opening this specific project, it loads the entire solution wiht all the others 29 projects.
Is there a way to open only this specific csproj?
The following structure can be used to get the desired behaviour:
Create a new Visual Studio solution
Delete the created default project
Add an existing project to the solution
Set the project as startup project (for re-build etc...)
You are now ready to go
You can do this in minutes and it's quite simple. Each sln file contains a number of projects that are written in this form :
Project(...) = "name.of.the.project", "{unique identifier of the project}"
and below that are the configurations for that project.
So you can write a javascript file to copy your original sln into each project folder found in that sln. After that iterate through each project folder and for each sln remove other projects. The javascript file can be runned using a .bat or cmd.
In this way you can assure that each project of your solution has inside his folder a new solution that contains that project.
We have a solution at work which has hundreds of projects.
So what we have done is have a Main.sln which contains everything. Then were have broken up the rest of the projects into different smaller solutions where they are grouped by relevance.
ie. All the database projects are in one solution, UI projects in another etc.
I had created a project which is C# console application project for which I need to call this project dll in another windows application project. I had built the project in visual studio 2010 and checked for .dll file in bin\debug folder, but it is not created.
But a manifest file and .exe file havebeen created. Please help me out how to create the .dll in this case?
You need to make a class library and not a Console Application. The console application is translated into an .exe whereas the class library will then be compiled into a dll which you can reference in your windows project.
Right click on your Console Application -> Properties -> Change the Output type to Class Library
To create a DLL File, click on New project, then select Class Library.
Enter your code into the class file that was automatically created for you and then click Build Solution from the Debug menu.
Now, look in your directory: ../debug/release/YOURDLL.dll
There it is! :)
P.S. DLL files cannot be run just like normal applciation (exe) files. You'll need to create a separate project (probably a win forms app) and then add your dll file to that project as a "Reference", you can do this by going to the Solution explorer, right clicking your project Name and selecting Add Reference then browsing to whereever you saved your dll file.
For more detail please click HERE
You need to change project settings. Right click your project, go to properites. In Application tab change output type to class library instead of Windows application.
Console Application is an application (.exe), not a Library (.dll). To make a library, create a new project, select "Class Library" in type of project, then copy the logic of your first code into this new project.
Or you can edit the Project Properties and select Class Library instead of Console Application in Output type.
As some code can be "console" dependant, I think first solution is better if you check your logic when you copy it.
Creating DLL File
Open Visual Studio then select File -> New -> Project
Select Visual C# -> Class library
Compile Project Or Build the solution, to create Dll File
Go to the class library folder (Debug Folder)
I'm working with a visual studio 2008 - You get access to a number of special folders to use if you want to include files within. One I don't see on the list is the user's local application data folder. Is there anyway to put files in that folder from within a VS2008 setup project?
When I was facing similar challenge, I made it so:
Created a class library auxiliary project.
Added the System.Configuration.Install.dll reference.
Added a new class inheriting from System.Configuration.Install.Installer
Wrote an override of the Install method to copy the files
In the Setup project, targeted the above mentioned project output to the Application folder and -
In Custom actions (Install group) picked the auxiliary project output from the Application folder.