Basic question. I don't really have an issue with approaching the coding for converting PDF to .csv or excel file types, but I'm relatively new to Visual Studio and .NET development. What type of project should I create in Visual Studio to best execute this kind of task? I want a clean simple-to-use end product.
Should I make a console app? A windows app? What's the best way to package my final project and distribute it to people who aren't tech savvy (i.e. what's the best type of project to build with the simplest instructions to execute for an end user).
If it helps, my code will be searching for a specific directory to access the pdf files. This would mean that the end user would dump their pdf files in that directory. Assuming the end-user does not have Visual Studio on their PCs what is the best project type to pursue?
I think that you need VS Solution with two projects:
a class library with business logic;
a Console/Windows Forms/WPF App project.
The last depends on your client's wishes.
Related
At the beginning my Revit Addin had only one project in Visual Studio but with the time I added more and more projects and per project always a new Addin (*.addin file) was created.
My question here is: Is there a best practice for this? Does one make several individual projects or does it bring from the performance in Revit something if only one large Addin project make?
In summary:
several *.dll and *.addin files
a single *.dll and *.addin file
as an addin?
Before I start to restructure my whole solution with several projects into one project, I wanted to ask if there are any advantages or disadvantages?
Yes. There are advantages and disadvantages. For an extreme example and some sample code that you can use if you want to decide to go for the single DLL and add-in manifest solution, take a look at the RvtSamples Revit SDK sample:
Revit Developer Centre
The Building Coder on RvtSamples
I implemented it as an external application. On startup, it reads one single text file listing over a hundred DLLs containing external command implementations and populates a menu with all of them grouped into different categories. When you click on a menu entry, the corresponding external command is loaded and executed.
Here is a log of some of the development steps. For your specific requirements, you may want to pay particular attention to the include file idea:
Loading SDK Samples
Loading The Building Coder Samples
Porting the Building Coder Samples
Debugging with Visual Studio 2010 and RvtSamples
Migrating the Building Coder Samples to Revit 2012
Compiling the Revit 2014 SDK
RvtSamples for Revit 2017
The Building Coder Samples 2017
Close Doc and Zero Doc RvtSamples
I made a search to find how am I adding an installer to my c# application. In every result I found that I need to add new file from Setup and Deployment templates, but I have no those templates. Even in online search I didn't find so.
what should I do?
The VS setup templates were removed post VS-2010.
Now, you have to use something else. "InstallShield" is still available, and Wix is a very popular install framework. You can, of course, just roll your own installer as well.
Alternatively, just use VS 2010 or earlier to create your setup/deployment projects.
I reckon you should do some research. There are many options out there depending on your type of application. Is it an executable that runs locally? Is it a Web application? Or a mobile application?
Microsoft provides lots of options/guides out of the box. Assuming you use Visual Studio 2013 check this MSDN article which is a good guide to start your research journey: https://msdn.microsoft.com/en-us/library/wtzawcsz.aspx
I would like to create a Visual Studio Solution and a C# Project programmatically, but without a instance of Visual Studio installed on the machine.
Scenario
I am trying to build a "engine" that will read some metadata in a SQL database and transform them into a UI. The database will be maintained by another people with a Web or WCF interface and I want the Server Application frequently (by schedule or pressing a button) use this informations to create autommaticaly a new version of the software (create solution -> project -> build -> create deployment).
So, I searched about programmatically create Solution and I found only the Automation Model in VS, it's about use an Add-In Project and this don't serves for my propose.
Perhaps I was a little confused in my explanation, so ask me more especific details, so I can be more accurate :)
Thanks for help
I think generating the solution is a little extreme.
The solution file structure hasn't changed much since 2005 http://msdn.microsoft.com/en-us/library/bb165951(v=VS.80).aspx, and there are a few projects trying to automate their generation, like Premake https://bitbucket.org/premake.
However, the kind of scenario you describe, might be I believe (better?) adressed with t4 templates http://msdn.microsoft.com/en-us/library/vstudio/bb126445.aspx, or only project file generation.
What you are describing is possible to do in C# Windows app but tedious and difficult. I remember seeing VB6.0 app like that but here i would suggest you look into WPF. Still it's C# programming but WPF can load dynamically a "window" from a string or a file if you want.
I made a little app with c# which I wanted to send to a friend to get an opinion. Problem is when I selected release configuration and click rebuild I get 7 additional files(3 dll's, 1 exes,...) along with the exe I want. Am I doing something wrong? I used to get single .exe files back when I used c++ with VS 2005.
You are not doing anything wrong. Its just that at release additional files are generated like AppConfig.xml for instange that holds your application settings, or a ClickOnce deployment package so that your friend can install the app. To get more used to c# you can start by googling articles about the differences between debug and release
Have you considered using the Click Once facility built into Visual Studio 2012?
Click Once Deployment - MSDN
Click Once will generate an installer that will that your friend can execute. It will automatcially download and install any dependencies (such as a specific .NET Runtime) if necessary.
To distribute referenced DLLs look at the following URL as it suggests the correct configuration settings:
How to: Specify Which Files Are Published by ClickOnce
It's been an horrible hour. Couldn't get Clickonce working for such a simple app. Moving just the 3 referenced dlls and the exe to another folder worked. Wix on the other hand...is difficult to say the least.
However, this allowed me to create a single setup file if not an exe in 10 mins. I sent a shortcut to the desktop which is more or less what I want.
This is for C#.
I know that I can include a COM File as a resource in my executable and then unpack it into the current directory when its needed. A com file such as LibCurlNet.
What I would like to know is if Visual C# 2010 Express provides an automated way of doing this.
Such as a simple option that I can select. I do not mean using the publisher.
I don't even think there is an automated way in Visual Studio Professional/Ultimate for doing this, let alone VS Express. You probably need to use a more manual approach, such as the one described here (but I guess you already knew that).
There is a tool for packing .NET DLL:s and native DLL:s called NETZ. Granted, I have not tried it myself, but maybe this tool can be of some help to you?