I am using Visual studio 2013. I added Microsoft.TPL.Dataflow 4.5.24 from Nuget Package Manager solution for project in VS. I also having Setup for this project.
When i rebuild the Setup Project All the .net referenced libraries(System.IO, System.Linq and etc.,) are also come in output directory. If i remove the TPL.dataflow then the problem wont exist.
I need to use this library for my project. Please Help me to remove Referenced libraries in the output of setup project
Related
I'm developing a set of assemblies which contain classes that, using a dependency injection framework, are supposed to be instantiated only by an "InstanceProvider" class --basically that's my gateway to SimpleInjector's GetInstance(). Then I'm packaging these assemblies as a nuget package.
My goal is to enforce that a developer does
var myDuck = InstanceProvider.GetInstance<IDuck>();
and doesn't do
var myDuck = new Duck();
For this, I have to avoid referencing some of the assemblies, the ones that contain the concrete implementations. I still need them to be there though.
So for now, I have them as dependencies in my nuget package. I'm looking for a way to keep them there, but when a developer uses the package for her project, some of the assemblies should not be directly referenced in their visual studio project.
Is this even possible?
Nuspec: can I have an assembly as a dependency but instruct visual studio to NOT reference it?
Since you do not want to those assemblies directly referenced in their visual studio project when you uses the package for her project, only keep them there. You can set those assemblies in the content files or tools files, like:
<file src="\*.dll" target="content\" />
<file src="\*.dll" target="Tools\" />
Check Creating the .nuspec file for some more details.
With this way, those assemblies included in the nuget package, but those assemblies would not directly referenced to the project when you use the nuget package.
Hope this helps.
General answer you can, but you should not bother about it till you really need to develop "plugins" enabled system. This turns debugging more complicated.
But continue to devide interface and realization - it is not related to dynamic loading, but helps you to devide code on layers.
There is a lot of DI tools that can this e.g. Unity. The techinque they use: you configure container in xml file that not require referencing. Then container search for assmeblies and load them.
I have some annyoing problem which I can't figure out. I installed Visual Studio 2017 Community on a new laptop and loaded an project I made on my old one from TFS. Suddenly some of the references can't get resolved.
So I tried to create a complete fresh ASP.NET MVC Project and download some of the assemblies that don't work in the old project by NUGET. After downloading the references don't work. I get already the warning in VS. One of those assemblies that doesn't work is for example
The referenced component 'System.Linq.Expressions' could not be found.
NUGET downloaded the assembly correctly and added the reference to the project. If I open the project file I find the entry for System.Linq.Expressions
and in HintPath: ..\packages\System.Linq.Expressions.4.3.0\lib\net463.
That file definitely exists on the file system. I also tried to change to path to an absolute one manually with same result.
I am using the newest .NET framework 4.7.2
Any suggestions what might be the problem?
I have a visual studio solution which works fine on one machine and when I copy the complete same solution to another machine it misses few external dlls.
Both the machine have same configuration and same version of visual studio.
I tried removing reference and adding again.I am able to reference the dll and use code but when I re-build,It gives the same error.Any pointers on what could have gone wrong?
The error message I get is as below
The type or namespace name 'NameSpaceName" could not be found (are you missing a using directive or an assembly reference?)
Also the warning shows.
The primary reference "NameSpaceName" could not be resolved because it was built against the ".NETFramework,Version=v4.5" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".
Both the machine have Visual Studio 2010 installed. It works on one and doesn't work on another machine
The reference you have added to the project is likely not in a subfolder of your project but referenced from the Global Assembly Cache (GAC). Since you probably didn't copy the GAC, this reference is now of a different version. Figure out which (3rd party ?) component is affected and install an older version of that component.
Typically, Visual Studio cannot target .NET 4.5, unless you applied a workaround. In that case, you can go to the project properties, Application and change Target Framework from 4.0 to 4.5.
I've started working on a Xamarin solution (a brown-field project) in Visual Studio 2013.
One of the projects is missing a reference to monotouch.dll.
I see that the DLL can be found in the following path on my machine, but don't know if I should be referencing it directly:
C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework\MonoTouch\v1.0
I checked the GAC for the assembly and NuGet as well, but couldn't find it there.
Is it OK to reference monotouch.dll from the above folder path? Or should it be referenced another way?
Note that I have Xamarin 3.8 installed, with Xamarin.iOS 8.4. Also note that we don't want to switch to the Unified API just yet, hence the reliance on monotouch.dll
Yes. If you create a new Classic API project you will see that monotouch.dll is referenced from that path.
#Rdavisau's answer is correct, but I also disovered what went wrong. I opened the old VS2010 project in VS2013, and I think VS2013 changed my target framework references on my projects.
I fixed this by editing the CSProj file and deleting the default CSharp targets:
And only keeping the Xamarin targets:
When doing this, the Monotouch.dll is automatically referenced in the right place.
I have a visual Studion solution in which different SSIS packages are included along with class library project for custom component. The class library project has post build event which copies the .dll file into GAC and into PipelineComponent(C:\Program Files (x86)\Microsoft SQL Server\110\DTS\PipelineComponents). Now, when i open the visual studio solution and try to build class library project second time, it gives me an error possibly because the .dll file is already locked by visual studio which is used by other SSIS packages.
Now, how can i tell visual studio to not lock the .dll file? I tried to unload the SSIS packages, but it didn't work.
Please note that i want my class library project and SSIS packages in one solution.
You have a solution. Your solution contains 2 projects: one is a .NET class library project while the other is an SSIS project.
The problem you are running into is that you cannot overwrite the dll in the Pipeline Components folder as it is in use by the SSIS project. I ran into the same issue when I was developing custom components. I can't remember if it's the SSIS Toolbox that puts the lock on the file or a package actually using the component that locks it. I also don't recall what my final resolution was but I tried a variety of things.
My resolution
Exclude the SSIS project from your solution. You can either do this permanently by removing it from the solution or temporarily by unloading the project during your build phase. Ultimately, I went this route and created a separate solution with the SSIS project in it. This allowed me to unload the project in the other VS instance whenever I needed to redeploy the DLL. It also empowered me to put breakpoints in the SSIS project which allowed me to attach the VS debugger of the .NET and then debug into my custom component. Maybe they've fixed that since the 2005 days but at that point, you were stuck using 2 instances of VS to debug into your package.