What are the uses of a "Empty Project" - winforms

I am using VS2010, When you create a new project, you can choose from ConsoleApplication, WindowsFormsApplication, WindowsService, etc. There's also Empty Project.
The empty project contains a reference folder without any references. What is the use of this Empty Project? Is it use for any test?

The “empty project” is used when you wish to create a project that does not have any files or reference automatically added to it.
Sometimes visual studio concept of being helpful is not what you want, and you just wish to be able to define a project to include only what you decide to put in it. This is not directly related to using a project for tests, but may be helpful when you are using a test framework that is not supported by any of the project templates.

Related

How to create custom function in excel add-in using office JS in already existing react project

I am new to a custom function. I already have a react project. I want to use one custom function in that project. I have read the document about it. It has two options either you can create a react js project or you can create custom function project.
can anyone guide me on "how to create a custom function in react project"?
Yadav, here is one option:
Generate a new add-in project using the yo office "Excel Custom Functions using a Shared Runtime" template.
Compare the following files with what you already have in your add-in project to identify the changes you need to make to add custom functions to your project: manifest.xaml, package.json, webpack.config.js.
Copy new files that identified in step 2 from the project you made in step 1 to your add-in project.
Make the changes identified in step 2.
Office add-ins that combine two kind of features - custom functions and, for example, react web app are run all of its code in a single shared runtime. A shared runtime isn't a type of runtime. It refers to a browser-type runtime that's being shared by features of the add-in that would otherwise each have their own runtime. Specifically, you have the option of configuring the add-in's task pane and function commands to share a runtime. In an Excel add-in, you can configure custom functions to share the runtime of a task pane or function command or both. When you do this, the custom functions are running in a browser-type runtime, instead of a JavaScript-only runtime as it otherwise would.
See Configure your add-in to use a shared runtime for information about the benefits and limitations of sharing runtimes and instructions for configuring the add-in to use a shared runtime. In brief, the JavaScript-only runtime uses less memory and starts up faster, but has fewer features.

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

Using a common project in several other projects in visual studio

I am working on a multi-solution project on VS 2013 in C (I must use C for this project). I implemented one "Common" project that I intended to use as a reference in another project. So I have one solution with a common.h and a matching common.c source in which I implemented all the common functions.
I now created a new "Application" project (inside the current one, so I now have 2 solutions) which does many things, and use the functions that are already implemented in the common.c file (that is in the "Common" solution). So I have a app.h file with a matching app.c source. I changed the settings so that the "Application" project will include the "Common" project.
However, when I run the "Application" solution (only it since the "Common" project is only used as a reference without a main function) I receive an error telling me that there is no reference to the functions in common.h.
I looked online for a solution and someone said that I should just copy the common.c to my "Application" project, however this is a very bad solution for me since I want to have multiple applications that all of them use the "Common" project.
How can I solve it?
You shouldn't have to copy any files to make this work. Right-click on your solution at the top of the Solution Explorer window. Choose Add -> Existing Project from the context menu. Find the project file for your "Common" project. It should show up in the list of projects for your solution.
Right-click your "Application" project in the solution explorer and choose "Properties" from the context menu. In the property pages window, go to "Common Properties". Click the "Add New Reference..." button. In the "Add Reference" window, go to the "Solution" tab, and then click the checkbox for your "Common" project. Click "Ok".
Now your "Application" project has a reference to your "Common" project. You can also open common.c and common.h from inside your new solution, and any changes will automatically be applied to all other solutions that reference it, because they are the original files and not mere copies.
The above method assumes that the output of your Common project is a DLL. Visual Studio (for whatever reason) won't automatically copy statically linked library (.lib) files. You can of course link against them, but adding a reference won't work. You will need to go to the properties page for your "Application" project, go to the linker -> input tab, and edit the Additional Dependencies line. You can also add the directory containing common.h to your Additional Include Directories under the C/C++ tab.
Either way, my opinion is that merely copying the files is a bad idea unless you're using modules in source control (e.g. Git modules or SVN externals) to manage dependencies.

WPF publish application files

I am trying to publish a WPF application using the publish section in the project properties. When I attempt to specify application files (i.e. references) for the publish, I see lots of old dlls that were once in the project but were deleted later.
Is there a way to clean up this list so that it matches the references actually used in the project ?
It is not possible without extensions. However you can check this question for more details. There are also some extensions listed you could use.

Visual Studio Project Linker: is it possible to populate destination project automatically?

I have a Silverlight project with lots of source files. Now I want to create a new WP7 project using the same source code files (but obviously, target WP7).
I link the WP7 project to the existing Silverlight project using Project Linker. However, this does not automatically generate links to the existing files in the source project.
Is there any way using Project Linker to automatically populate the destination project with the already existing files in the source project? Or do I manually have to add links in the WP7 project to all previously existing files in the source project?
I have the same problem, but I resolved it.
Simply exclude all files from "source" project and then re-include them.
In this way project linker refresh its references adding all links!
It worked for me!
I'm not quite sure what you but I think you'll have to do manually in VS.Net, but if all the files in the same directory you can add all the files in one go, it sounds as though you want to select the 'Add as Link' option once the add 'Existing items' dialog is displayed.

Resources