Nuget package all sub project in a solution - tfs

I have a solution which contains more than one Project. Project structure is as below.
/root
A.sln
A.nuspec
/ProjectB
projectB.csprj
projectB.nuspec
/ProjectC
projectC.csprj
projectC.nuspec
I have a few question.
1- What happens if I run nuget pack A.nuspec in root folder. Is there a way package all Project in a solution.
2- When I send the code TFS, with "NuGet Packager" I can use a regex to packege all sub Project as shown below. Is there a way to use such a regex in local environment.
3- Is it possible to create a nupkg contain both sub Project.
4- Is it possible to create a nupkg contain more than one dll. Can I put all dependency of the Project into nupkg.

1- What happens if I run nuget pack A.nuspec in root folder. Is there a way package all Project in a solution.
I don't believe there is a way to package all project in a solution by using .nupsec. That because the process of creating a package always begins with creating a .nuspec package manifest file that describes your package contents. This manifest drives the creation of the package as well as its usage when installed into a project not solution. And the ID and Version must be unique in the .nupsec, so we could not use the unique ID and Version to specify multiple projects.
2- When I send the code TFS, with "NuGet Packager" I can use a regex to packege all sub Project as shown below. Is there a way to use such a regex in local environment.
The answer is NO. I have test it on my local machine, the wildcard is treated as Illegal characters in the command line.
3- Is it possible to create a nupkg contain both sub Project.
If I understand you correctly, you mean the sub Project is reference project? If yes, the answer is yes. You can use the the option "IncludeReferencedProjects" to include referenced projects either as dependencies or as part of the package. please refer to this document for detail.
4- Is it possible to create a nupkg contain more than one dll. Can I put all dependency of the Project into nupkg.
Of course you can. You can refer to another thread which I have answered for more detail. If you want to put all dependencies of the Project into nupkg, you can use the <dependencies> to include all dependencies in the .nuspec.
<dependencies>
<dependency id="Newtonsoft.Json" version="9.0" />
</dependencies>

Related

nocache.js not found in Vaadin project

"Requested resource [/VAADIN/widgetsets/AppWidgetset/AppWidgetset.nocache.js] not found.." I get this when I'm including new addons, either from a JAR file or through Maven. Sometimes, if I've added the dependency in Maven, adding the JAR file as well to the build path fixes it, sometimes it's the other way around, other times compiling the widgetset and/or theme fixes it, and there are even times when nothing helps. This type of behavior seems to me more random than scientific.
I would love to know how to properly add dependencies to the project so that I can avoid this problem.
Select the UI project and goto Properties - Deployment Assembly. Check if you already have widgetset.jar file. If the widgetset.jar is missing then Click on Add -> Maven Project and select widgetset (make sure the jar file naming convention follows backend project like WEB-INF/lib/qqq-widgetset-1.0-SNAPSHOT.jar and WEB-INF/lib/qqq-backend-1.0-SNAPSHOT.jar)

Add a jar file to my Xamarin project

I am wanting to add the "universal-image-loader jar" file to my Xamarin project and am not sure what I need to do. I have had a look at this resource but would still like some help please: itexico.com/blog/bid/100447/Android-Wear-Developer-Preview-Using-Xamarin-Jar-Binding
Here is what I have done so far:
Downloaded https://github.com/nostra13/Android-Universal-Image-Loader
Created a folder called "Jars" in the root folder of my Xamarin project
I have added the "universal-image-loader-1.9.2-with-sources.jar" file to the "Jars" folder
I have set the build action to "embedded resource" for the "universal-image-loader-1.9.2-with-sources.jar" file
I have successfully build the project
I still cannot use the ImageLoaderobject in my application. I cannot resolve a ImageLoaderobject and am not sure what else I need to do.
May I please have some help?
Thanks in advance
I'd suggest you use Java Bindings Library for that.
What you need to do is to add a project to your solution of type "Android Java Bindings Library" you DON'T need to create Jars folder it is created in the new project by itself. Add your jars there. On your startup project click on references and add the java binding project you have just created as a reference. build it and try accessing your assembly either by adding it in the using section or by it's fully qualified name.
Good luck!

Dart project structure for apps (not libs)

I am trying to understand Dart's recommended project structure and not seeing the "forest through the trees".
So, if my project is intended to be a reusable library, say, a logging framework of some sort, then if I understand the above link correctly, I want all of my development to be under a lib and lib/src directory.
But what if I am building a web app? Where do my Dart source files go? Under packages? Specifically:
Where do I place Dart source files for a web app (not a lib)?
Are my web app's "packages" just directories that are logically organized similar to Java packages?
Does Dart recommend a 1-class-per-file convention for its source code?
1)
your_app_package/web
your_app_package/web/src/xxx
static content like jpg, css go to
* your_app_package/asset
2) the packages directory is maintained automatically. You configure in the file pubspec.yaml which 3rd party libraries you want to use and then call pub get or pub upgrade and the packages directory is updated automatically (the Darteditor does this automatically when you update pubspec.yaml).
3) not that I know of.
I had some problems putting additional classed in the code file of a Polymer element though. But I guess this is just a temporary limitation of Polymer.

Duplicate package problem

I am trying to integrate Twitter in my application. I import two .jar files with different names, but one package has the same name in both files. When I compile, it shoes following error.
Description Resource Path Location Type
D:\CustomClasses\ksoap2-j2me-core-prev-2.1.2.jar(org/kxml2/io/KXmlParser.class): Error!: Duplicate definition for 'org.kxml2.io.KXmlParser' found in: org.kxml2.io.KXmlParser
Assuming the two JARs are third party (not platform libraries), you should consider a more sophisticated compilation and packaging step. But before going down this path, check to see whether the JARs you are importing don't come in different forms -- ones that don't embed their dependencies.
Either way, have a step in your compilation to extract just the parts that you need from each JAR.
If you are not using build scripts but use an IDE for everything, set up a build script just to build your customized dependencies JAR.

where to find "package com.rim.samples.docs.notifications;"

i a developing blackberry aplication using eclipse can any one tell where to find the following library
package com.rim.samples.docs.notifications;
i have downloaded it from blackberry site but i dont know how to use it
com.rim.samples.docs namespace is common for samples BlackBerry Application Developer Guide.
On the other hand, "package" token defines the packege namespace, not the import.
If you have downloaded code and post it to namespace with other name, you may have trouble to compile it. Resolve it in two ways:
1. if your code file is placed directly in project src folder, simply remove
package com.rim.samples.docs.notifications;
from code, this will set namespace to default.
2. in project src folder create folder "com\rim\samples\docs\notifications" and move file to folder "notifications".

Resources