Referencing BO project DLL's from website in solution


Author
Message
Rusty Martin
Rusty Martin
StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)
Group: Forum Members
Posts: 3, Visits: 25

I seem to remember in a web solution demonstration that I saw, that you kept copying the DLL’s for the referenced BO project from the BO project to the website project each time he made a change to the BO’s and built them. It seems to me that the right way is to reference the BO project from the web project but each time it tries to get the new copy of the DLL from the BO project, I get an Access Denied error and I have to manually delete (using the file system) and then manually copy the files to the right bin folder to get the reference to update.

Am I correct to reference the BO project or is copying them manually the right way to update the reference when needed?


Charles Thomas Blankenship...
Charles Thomas Blankenship
StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)
Group: Awaiting Activation
Posts: 172, Visits: 12K
Hi Rusty:

Are you running the application in debug mode through Visual Studio?  If so, check for a little Icon down in the lower right hand side of the status bar.  It is a web server that is running under VS and it will take hold of your dll stoping an automatic copy on rebuild.  Before you build, right click on this little icon and select stop.  Then rebuild ... the BO dll should then be copied into the web app's bin folder.

Ben helped me fix this little problem last week ... I hope it will do the same for you.  As for me, it saved a ton of aggrevation and time ... thanks Ben.

Best and happy holidays,

CTBlankenship

Charles T. Blankenship
Senior Consultant
Novant Consulting, Inc.
704.975.7152
http://www.novantconsulting.com

Keith Chisarik
Keith Chisarik
StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
I have not been able to get around manually copying the BO project DLL's into the bin folder of the web project when I make changes. Gonna watch this thread to see the resolution, good topic.

Keith Chisarik
StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
If you reference the DLL on disk, you will have to manually copy the file each time the business objects change.  If you reference the BOLibrary project, then VS will automatically take care of building and copying the DLL to the \bin directory.  However, like CT said, if you are running the website from within VS, manually copying the DLL can only be done when the development server is stopped (which doesn't happen when you stop a debug in VS... it only happens when you right-click the server icon in your systray and click "Stop").  Obviously, when you publish your website, this information changes... the DLL always has to be copied out to the \bin folder on the webserver, and I'm not sure if VS will copy it out there automatically or not.
Guillermo Vilas
Guillermo Vilas
StrataFrame User (192 reputation)StrataFrame User (192 reputation)StrataFrame User (192 reputation)StrataFrame User (192 reputation)StrataFrame User (192 reputation)StrataFrame User (192 reputation)StrataFrame User (192 reputation)StrataFrame User (192 reputation)StrataFrame User (192 reputation)
Group: StrataFrame Users
Posts: 112, Visits: 2.3K
Hi

The scenario described above occurs when a developer select to create a web project from the system file option.

When you select to create the web project the old way (http://localhost) there is no icon running a virtual host, thou there's no need to recopy the dll been referenced as Visual Studio will take care of that.

------------------------------------------------------------------------
I would like to change the world, but they don´t give me the source code.
MS Windows 7 Ultimate 64-Bit
Intel(R) Core(TM)2 Quad CPU Q9300 2.50 GHz
6.00 GB of RAM, NVIDIA GeForce 9800 GT

MacBook Pro i5 OSX Lion
StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Hrm... that's a good point... if you open the website from the file system, VS uses the development ASP.NET server, otherwise, it just uses the server through which you opened the site.
Guillermo Vilas
Guillermo Vilas
StrataFrame User (192 reputation)StrataFrame User (192 reputation)StrataFrame User (192 reputation)StrataFrame User (192 reputation)StrataFrame User (192 reputation)StrataFrame User (192 reputation)StrataFrame User (192 reputation)StrataFrame User (192 reputation)StrataFrame User (192 reputation)
Group: StrataFrame Users
Posts: 112, Visits: 2.3K
Also this is a good chance to include that if the web project is not going to be a huge one, there is no need to create a BO project. You can add a class file into the App_Code folder and then inherit from MicroFour.StrataFrame.Business.BusinessLayer.



eg:1)



App_Code

- MyClass.vb or MyClass.css

- MyClass.Designer.vb or MyClass.Designer.cs



2) Add an existing BO Component from another project to the App_Code



for me both options works

------------------------------------------------------------------------
I would like to change the world, but they don´t give me the source code.
MS Windows 7 Ultimate 64-Bit
Intel(R) Core(TM)2 Quad CPU Q9300 2.50 GHz
6.00 GB of RAM, NVIDIA GeForce 9800 GT

MacBook Pro i5 OSX Lion
StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Yes, that will work, however, not all functionality of the BOMapper works with a Web Site, and you cannot get to the component designer for the business object, so you have to set all of the properties programmatically.  So if you cannot rebuild the partial classes of your business object, or you want the component designer, then you'll have to put the BOs in a DLL or convert the web site to a web project.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search