Welcome Guest Search | Active Topics | Log In | Register

Help with Compiling under Web Application Project Options · View
slickJoe
#1 Posted : Thursday, February 14, 2008 4:45:21 AM
Rank: Member


Joined: 2/13/2008
Posts: 21
All,

I am trying to compile 1.9.3 under a Web Application project.

I got the "bin" zip and added it to my existing asp.net project.

I am having compilation errors. So Iremoved the classes from App_Code and moved them into top level directory.

Even then the compilation errors happening. It is not able to see those classes.

Error 1 The type or namespace name 'Editor' does not exist in the namespace 'YAF' (are you missing an assembly reference?) C:\projects\test\testWeb\controls\EditUsersSignature.ascx.cs

Error 2 The type or namespace name 'Editor' could not be found (are you missing a using directive or an assembly reference?) C:\projects\test\testWeb\pages\pmessage.ascx.cs
Error 3 The type or namespace name 'Editor' does not exist in the namespace 'YAF' (are you missing an assembly reference?) C:\projects\test\testWeb\pages\postmessage.ascx.cs
Error 4 The type or namespace name 'Editor' does not exist in the namespace 'YAF' (are you missing an assembly reference?) C:\projects\test\testWeb\pages\posts.ascx.cs


Has anyone added this to WAP project type? I have no issues with 1.9.1.6 version.

Please help? anyone? TIA
mddubs
#2 Posted : Thursday, August 07, 2008 7:36:56 PM

Rank: YAF Developer



Joined: 8/7/2008
Posts: 164
Location: Chicagoland
I am having the same exact problem! I downloaded the source and added the projects to my solution. Then in my already existing Web Application, under my "Members" folder I created "Forum" and imported all the existing items from the "YetAnotherForum.NET" website project.

The problem is with the items in the App_Code directory. I tried adding the App_Code directory with its items to my Web Application and also I tried taking just the "YAF" folder out of App_Code and adding it to the root of my web app. Both of which throw these 4 errors.

Any suggestions? I'm stuck!
kovv
#3 Posted : Wednesday, October 08, 2008 10:54:59 PM

Rank: YAF Forumling


Joined: 10/8/2008
Posts: 3
Well, seems I'm not alone.. but still no solution in sight.

I've tried to integrate the forum with a completely new webforms and with a mvc application, got the same errors on both.
I'm pretty much desparate by now, any suggestions on how to fix this?


mddubs
#4 Posted : Friday, October 10, 2008 9:00:25 PM

Rank: YAF Developer



Joined: 8/7/2008
Posts: 164
Location: Chicagoland
Can any of the pros weigh in on this?

My work around is to copy all the YAF files to the appropriate places within my project folder and then publish by doing "Copy Everything from Solution Folder". So it works, but I can't work with any of the YAF stuff within my solution in Visual Studio. I can't add YAF as a project to my solution without getting these errors, if I'm explaining it clearly.

I'd love to be able to add it as a project and work with everything within one solution, which sounds like what these guys are trying to do too. Are we doing something wrong?
Jaben
#5 Posted : Saturday, October 11, 2008 4:48:30 AM

Rank: YAF Head Dude



Joined: 10/10/2004
Posts: 3,045
Location: Honolulu, HI
For some reason I cannot even get the WAP project to compile. I don't have tons of time to put into it today, unfortunately.
"When you are grateful, fear disappears and abundance appears”."

kovv
#6 Posted : Saturday, October 11, 2008 12:16:15 PM

Rank: YAF Forumling


Joined: 10/8/2008
Posts: 3
UPDATE:

Ok, I've got it compile..

This is what I have done:

.) Created a new WebApp Project and a Class Library Project, added the Files from the YAF Website Project to the Webapp (except the App_Code folder wich goes into the Class Library Project).
.) Added all needed references to the Library to get it compiled.
.) Updated all web.config entries referencing System.Web.Extensions (even the 3.5 config has references to 1.xx of the assemblies, so you will need to update no matter what config you use).<- That was causing the exception, it tried to load the 1.xx ajax assembly.. (I'm stupid i know Razz)
Just leave the entries and add:
Code:
    <runtime>
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <dependentAssembly>
          <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
          <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
        </dependentAssembly>
        <dependentAssembly>
          <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
          <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
        </dependentAssembly>
      </assemblyBinding>
    </runtime>
.. works like a charm Smile

.) Update the web.config control entries to use the assembly created by the Class Library:
<add tagPrefix="YAF" namespace="YAF" assembly="YourClassLibrary"/>
<add tagPrefix="editor" namespace="YAF.Editor" assembly="YourClassLibrary"/>
.) The last step was to convert the thing to a WebApplication so all pages get updated to use the ClassLibrary.

After doing these steps everything complies fine, but here comes the next problem... when i run the app i get an "file not found" exception when it tires to load the the forum.ascx control.

This is where I am stuck right now...

Any ideas?Cheesy Grin
mddubs
#7 Posted : Monday, October 13, 2008 3:27:31 PM

Rank: YAF Developer



Joined: 8/7/2008
Posts: 164
Location: Chicagoland
I can vouch for that...

I tried a bunch of different things to get this to work, but I either ended up with the 4 compile errors above, or a run-time error for forum.ascx.
tbird888
#8 Posted : Tuesday, January 06, 2009 8:42:23 PM

Rank: YAF Forumling


Joined: 1/5/2009
Posts: 2
Location: Cincinnati
Has anybody come to find a solution to this issue? I am experiencing the same problem and have, like everyone else above, run out of options and time. Here's hoping this post will bring this thread/issue back to life.
DrKefir
#9 Posted : Tuesday, January 06, 2009 11:58:38 PM

Rank: YAF Forumling



Joined: 12/7/2007
Posts: 4
Location: Göteborg
I'm also stuck here. Whatever I try I just end up with this runtime Compilation Error.
Quote:

Compiler Error Message: CS0433: The type 'YAF.Forum' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\cfc5a25e\ab570fb2\assembly\dl3\8b039c11\80575a06_5070c901\FH.Click4Cod.Web.DLL' and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\cfc5a25e\ab570fb2\App_SubCode_YAF.yeny4zqo.dll'


when I run
Code:

Line 19:     <form id="form1" runat="server" enctype="multipart/form-data">
Line 20:         <YAF:Forum runat="server" ID="forum"></YAF:Forum>
Line 21:     </form>


I'm trying to set up the 1.9.3 RC2 within my existing Web Application. I've tried the SRC and the bin version. And I've tried with a lot of different configurations. Having my web app referencing YAF projects as well as pre-built YAF dll's. I'm out of ideas. Anybody getting this to work?
DrKefir
#10 Posted : Wednesday, January 07, 2009 12:25:14 AM

Rank: YAF Forumling



Joined: 12/7/2007
Posts: 4
Location: Göteborg
So, maybe I've got it working now. Very Happy
I just need to verify that it is actually working and then figure out exactly what made the trick.
Be right back with some more comments.

... Here it goes.
The short version is that I changed the Build Action of the Forum.cs file (in the App_Code/YAF folder) from Build to Content
But I now realize that my problem wasn't a "file not found" exception as described in a earlier post in this thread, so this trick might not help you.

Longer Version.
*Using Visual Studio 2008 v. 9.0.30729.1 SP, .Net Framework 3.5 SP1
*Downloaded YAF-v1.9.3-RC2-SRC. Opened up the yetanotherforum.net.vs2008.sln and converted it.
*Used the Recommended.NET3.5web.config.
*Changed all projects to build with the .NET 3.5 framework.
*Changed to Release mode and build solution.

(*Notes to myself: Copy all the dll:s (YAF.XXX.dll, Intelligencia.UrlRewriter.dll, CookComputing.XmlRpcV2.dll) to a "ThirdPartyComponents-" folder in my existing web app solution. I kind of like it organized that way.)
*copy all the contents of the YetAnotherForum.NET Web SITE project to a sub-folder (in my case "yaf" ) within my existing Web APPLICATION.
*Edit and organize the .config files (as described elsewhere in this forum).
*Move the App_Code folder to your root directory.
*Add references (for your Web Application) to all of the 7 YAF.XXX.dll, Intelligencia.UrlRewriter.dll, CookComputing.XmlRpcV2.dll (and if not allready exist also AjaxControlToolkit, System.Web.Extensions and System.Web.Extensions.Design)
*Right click your Web App and select "Convert To Web Application". (Note: The studio altered the folder name App_Code to Old_App_Code while converting. Rename back to App_Code).
*Alter the Build Action from Compile to Content of the forum.cs file (probably all .cs files in App_Code)
*Build your solution and run your web application.

If you want the whole YAF source code in your solution you could probably add all the projects to your solution and then have your web app referencing the projects and not the dll:s as described above. In that case you probably also want YAF projects reference each other by project and not by dll (sorry about the poor choice of datalinguish here but)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAFPro Theme Created by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.3 RC2 | YAF © 2003-2008, Yet Another Forum.NET
This page was generated in 0.129 seconds.

SourceForge.net Logo Powered by ASP.NET v2.0 411ASP.NET