Programmatically creating VS solution/project files - c

I have a C project with a very nice rake build system in place. Unit test runners, mocks, as well as some boilerplate code, are generated.
The requirement is for the pc based stuff to be available in VS. I know the VS .sln and .proj formats are undocumented.
I also know that cmake can generate VS solution files as long as it's own files are up-to-date so my fallback solution is to create the cmake file structure/lists and use it to create the VS solutions.
Since my fallback reeks of duplication, I am looking for pointers to any other tools, templates or documentation that would allow me to create VS project and solution files.
Thanks for all the help

Actually, .vcproj file format is documented and you can find it on the MSDN website:
http://msdn.microsoft.com/en-us/library/2208a1f2(v=VS.100).aspx
And here is the Solution file documentation:
http://msdn.microsoft.com/en-us/library/bb165951(VS.80).aspx
I'm sure you can find more useful information on MSDN.

Related

Use of cn1libs in cn1libs?

Is it possible? I couldn't find anything concerning this in the documentation. When I try to refresh cn1libs (which I downloaded over the CN1 preferences) in my cn1lib project it is stated that it's not relevant for this kind of project, although I would like to write a utility library based on other cn1libs.
There is no official support for dependency hierarchies in cn1libs because we don't want to create a "dependency hell". However, the extension manager does allow you to declare dependencies and you can use other cn1libs.
If you have a cn1lib you need to use you can just add it to the build classpath of the cn1lib you are currently building. In NetBeans this can be done from the GUI but can be done in other IDE's via the netbeans properties file. You can then use the other cn1lib, just make sure to include both cn1libs in the user project or you will get a dynamic link error.
See this https://www.codenameone.com/blog/tip-nest-cn1libs-cross-dependencies.html

which files are need to be packaged with cefsharp winforms application

By using CefSharp version 37.0.0 my winforms application is ready to submit in college but I am not getting which files (DLL,exe,pak) are need to be packaged along with project references. I already gone through this article https://github.com/cefsharp/cef-binary/blob/master/README.txt#L104-L106 but still confused in :
Is all .pak files (cef.pak,cef_100_percent.pak,cef_200_percent.pak,devtools_resources.pak and all files from locales folder) are used for developer option?
Can I make separate folder cefSharp reference files?
It's hard to give a definitive complete answer, so: "It depends" on what your application uses. For .pak files e.g. if you are not using the DevTools in your application you can skip devtools_ressources.pak etc. similarly with languages and e.g. WebGL and other of the CEF .dll files.
See https://github.com/cefsharp/CefSharp/issues/527 for a discussion already marked faq-able! it also contains info on setting path for .pak files. You can inspect the binaries etc. of the resulting WinForms application at https://github.com/rfgamaral/SlackUI/releases.
Moving .dll files around is not recommended/supported.
Also see this related SO entry: What is the purpose of the cef.pak file in cefsharp?
In theory, you can see a rundown of all the files here:
https://bitbucket.org/chromiumembedded/cef/src/aefb5ccce879f308f0bcc3ac719c86defe2f9715/tools/distrib/win/README.redistrib.txt?at=master
However, one thing they don't note about not including cef.pak (or disabling pak loading altogether) is that it will cause things like red scrollbars (at least on windows). I've found I need to include cef_100_percent.pak to avoid this.

How to install NancyFx on Ubuntu

I'm trying to learn how to use NancyFx with Mono in Ubuntu.
I've successfully built Nancy using the MonoRelease target in MonoDevelop (opening the solution in the IDE, selecting the MonoRelease build target, running Build).
I've created a new MonoDevelop solution in a separate directory called NancyTest. When I go add the references to the project it can't find them anywhere.
Any ideas?
Here is a better answer then the super vague one already given. You can use Nuget to install the the items you need and then add them as references.
https://github.com/NancyFx/Nancy/wiki/Hosting-Nancy-with-Nginx-on-Ubuntu
The URL is a very nice example of how to get started with your first webpage. the nginx settings don't look super specialized, so you can probably use Apache if you wish. Since the items are written with mono and Nancy you can get away with using Jenkins CI, which is what turned me on to Nancy and mono, so I wouldn't have to install another server. Sorry this post is over a year old, but I came across it while looking for answers, and felt the answer currently given was poor and needed a better example for future users in the same search as me. So to answer your question, I'd bypass the build from source and just install using Nuget/powershell.

NuGet Package Restore Strategies

My sincerest apologies, if this has been asked before. I've searched the site but have not seen an answer for what I'm looking for yet.
For years, my company has referenced custom binaries in a local folder hierarchy within source control. We're in the process of changing our source control, and in the process are defining new strategies for many things. One of the things I've been working on is to setup a local NuGet feed for our custom packages to replace the old source control folder method. I've been able to successfully create custom packages and using the package restore feature, log into our build box to restore both NuGet packages from our local feed, as well as those from the official NuGet feed. Everything has worked well up to this point.
The time has come to begin testing our migration process from our old source control to the new source control, and convert all of the references over to NuGet packages. Where needed, we're creating packages and placing them on our local NuGet server. The issue I came across today involves a project that uses an old version of a vendor library. I searched the official NuGet feed and found the library as a package, but the particular version we used at the time is no longer available.
I know from the fact that package restoration was a highly requested feature, that other companies are already employing the strategy we're attempting now. My question is what strategy is your company implementing when operating under this criteria? Is there a best practice we should be considering?
Thanks for your time and assistance.
That's quite a big question to answer so I'll recommend you some resources to read up on this topic.
I wrote an MSDN article on some patterns and practices I'd recommend when using NuGet into the organization. Maybe you'll find something useful in there: http://msdn.microsoft.com/en-us/magazine/jj851071.aspx.
There's also the book Pro NuGet available at http://bit.ly/ProNuGet.

How to deploy WPF application with WIX

I have started to use WIX to deploy a WPF application. I have created the .wxs file with the desired interface features etc...
My questions is how to distribute the required .Net files that support my WPF executable? Not the .net framework or sql server express, but the dependencies needed to run my executable.
Should the process include building a msi with VS Installer, then including that msi into my WIX script and running that inside of my WIX msi?
Or, what is the correct process for distributing a WPF executable with WIX?
I don't think your question pertains to WiX or WPF at all. What you need to ensure is that you package up the necessary dependencies along with your installer, whatever they may be. Referencing your dependency files in your installer script should be sufficient.
Here's the process that I follow for any application.
1) Start with a clean VM that represents the least common denominator of a machine I want to target. Let's say WinXP SP2 32bit.
2) Deploy my application by hand and record all of the steps in a word document. Then try those steps on other OS's to make sure you didn't miss anything.
3) Take each of the steps in my document and implement them in WxS. Keep in mind that Windows Installer and Windows Installer XML is a declarative programming language not an imperative programming language. You don't tell it to xcopy files from dir a to dir b, you describe the directory structure and the installer takes care of it.
BTW, of the things you mentioned, your asking for help with what I consider the simple stuff and excluding the harder more complicated stuff.
As an alternative way, you might see also this post Embedding dlls in a compiled executable to embed all the dll needed (like the interop ones for example) using Costura.Fody. Using WIX there is no more need to add any dependent dll as components in the .wsx file.

Resources