I noticed that the DLLs in the bin folder for asp.net websites do not seem to be getting saved. When I goto a new computer and get latest I am missing the DLLs.
What is the correct way to fix this ? Should I create a seperate folder to contains all DLLs ? And then can I somehow tell my bin references to goto that folder to get the DLLs?
If you are using third party dlls, you should absolutley consider putting them into TFS...
If those dll comes from another project from the same solution, you should not put them into TFS.
If you use a base class library in multiple solution, I would consider using the build functionality that TFS offers. You can access your latest build from a network share (add this share as a trusted source) or directly access those dll files from TFS source control.
EDIT: you can always go back in time in tfs without having to save whats compiled....
You do not want to check your compiled .dlls in with your source control. If you have other dlls that are not directly compiled by your application then you should create a library folder in your directory structure that contains then, and check that folder in.
Related
If i release(publish) a mvc project to a folder. Lets say I make a change to _layout later in my solution and publish again, what files do i need to update on the ftp? bin or (_layout in views folder)?
When do I need to update stuff in View or bin?
bin folder contains your dlls, you project dll let's say project.dll is subject to update when you compile your server side code.
Otherwise it is enough update only relevant view file.
You can publish one invidual file thus update it to ftp
My question may have already been asked but any of the answers match my case.
I need to do a website (ASP.NET MVC 4) with some features of a software. I have finished to developed my website and wanted to test it in a test environment (Windows server 2008 - 64bits).
It works perfectly fine with my dev computer(windows 7 - 64bits). But after I deployed it on IIS, one of my features doesn't work.
This feature is a bit particular. It need a 32 bits COM written in VB6 (this dll can't be change) that call an other dll. When I test the website deployed on IIS, the first ddl is called fine but the 2nd seemed to be not called at all.
This dll are in the installed file of the software. I have the same version of on both computer.
I authorize my app pool to use 32bits application. I tried to give some access to my dll (the COM and interop) like IUSR, IIS_IUSRS. But nothing seems to work.
I have checked both of my dll are registered properly.
I'm a bit lost. Can someone help me ?
PS: Sorry for my English, I can speak but I'm really weak with syntax.
Some suggestion here:
You need to figure out which managed dll, native dll and lib files are referenced by your application (directly or indirectly).
For managed dll, make sure they are in the web's bin folder.
For native dll and .lib files, check out whether those .dll and .lib files are in the PATH. If not, you can either copy them to there; or, you can put them into a folder and add that folder into the PATH. Then restart VS and IIS (command "iisreset") to make sure the setting is picked up.
By the way, putting all of the files in the web's bin folder won't help. The reason is CLR copies the files into a temporary folder under framework directory and run the web there, but CLR only copies away managed dll (not the native ones), so you still get "module not found" error.
I have reproduced this error using the following sample solution
Web1 references a managed c++ project say "MCpp1.dll". The project further references two unmanaged c++ projects with the output say "Lib1.lib" and "Lib2.lib"
If I copy all of those files into web's bin folder, I get the exception of "module not found error".
I create a folder say "C:\Lib" and copy "Lib1.lib" and "Lib2.lib" into it and add this folder into PATH. I restart VS, and also run "IISReset" since I have a IIS web
Open VS and request a page and it works now
I have also contacted the CLR/Fusion team for suggestion of how to get the related module name when this exception happens, which should be very helpful to make diagnosis.
Hope this helps ,
GODFATHER
this is likely a naive question, but I want to do this right the first time.
I have a MVC solution which has the following:
Data project - C#
Services project - C#
MVC Web Project - ASP.NET MVC
Test Project
Currently, I am using the MVC2 source as a means to debug my own code. I do not plan on checking that in, but I realize once I go back to the MVC2 DLL, my solution will change.
I'm pretty sure I just shouldn't check in stuff that changes with each build: the bin folder on the Web project, for example.
Is there a list of what not to commit to source control? :)
Exclude the bin folder. Also be on the look out for .user or .suo files. Those file store your own settings and will change from user to user so it shouldn't be in source control.
If you're using a database stored in the App_Data folder, be sure to ignore that as well (the database file, not the App_Data folder).
Generally, I exclude the bin and obj folders of every project from source control. I can't remember needing to do anything else.
do you use ankhsvn?
i think ankhsvn automatically exclueds directories which are not needed in subversion
cheers
I am building a web application with .NET 3.5. I have several class library projects being referenced by my web forms.
I am deploying using a web setup installer.
When I install the application and hit the opening page, I get null pointer exceptions to some (not all) of the objects in my class library. Looking at the stack trace reveals that something somewhere is looking for a directory that exists only on my development machine.
When I do IISRESET, the errors vanish.
Does anyone have any idea why my application (web.config is compiled with debug="false") is attempting to look for things on my local dev machine?
My active build is set to release.
Thanks.
Did all the .dll's you used in your site get published with your code? If not make sure they are placed in by the installer, and the web config is not hard coded to look for references.
Open Visual Studio, look at the References folder and check to see if any of those references are pointing to the file(s) in your DEV machine. If so, I suggest you add a new folder to your app (i.e. Assemblies) and add all the dlls your application references in that folder.
After that, make sure all the references in your project are pointing to the dlls in the Assemblies folder and not some folder that only exists in your DEV machine.
I need to use a dll in my asp.net application. How do I load a dll not from a bin directory?
Perhaps I should mention that the application is a mixture of asp code and asp.net code.
so, when I develop it on my machine, I place a dll in the bin directory, but after I move the code to the live environment, I don't want to have a separate bin directory for every piece that's using asp.net.
All I am moving is .aspx and .aspx.cs files. Is there a way to load a dll NOT FROM /bin (specify it with "using" statement)? Looks like it automatically looks in the /bin....
You can either place the DLL in the bin folder of the root of your application, or install it to the Global Assembly Cache (GAC) using gacutil (which requires the assembly to be strong-named and signed).
I would just keep it in the bin.
.net app looks in the /bin of the project, and the GAC (Global Assembly Cache) where you put system shared DLL-s.
If your app is one .net app (configured in IIS as one app), but you have aspx files in subfolders, they should see the root /bin folder. i'd stick with keeping dlls in /bin, if that isn't several tenths of bins (which would mean that you have a problem with your app organization).
GAC and bin are the only usual options.
You might also be able to configure your other folder as an additional bin folder, but I wouldn't hold my breath — this is from 1.1 and you still need to be within the same vdir as the main application.
Simply add the other dll's directories to your path environment variable. Must restart asp.net process / visual studio for the change to take effect. Worked for me.
that's the thing: because it's poorly organized (its a mix of asp and asp.net) it's certainly NOT configured properly....I think it's best to have "10 thousands bins" for now.
Thanks guys!