.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

.NET 2.0 Project won't build when targeting .NET 4.0

Posted By:      Posted Date: September 02, 2010    Points: 0   Category :.NET Framework
 
Hi, I'm in the process of giving a .NET 2.0 application a brand new UI using WPF. I created a whole new solution but there are a few .NET 2.0 class library projects from the original that I have copied in. They build fine by default. I want to change them to target the .NET framework 4.0 though so that this application won't require two different versions to be installed. When I change it to target .NET 4.0 client profile it gives me a big list of errors saying that references to a another custom 2.0 library (not in the solution) don't exist (E.G. The type or namespace 'x' could not be found (are you missing a using directive or an assembly reference?)). I'm not missing either. In fact the very first error is complaining about the line containing my using directive. Can you not reference a 2.0 library from a 4.0 project?


View Complete Post


More Related Resource Links

Video: How to Build SharePoint 2010 Project Items, Features, and Solutions

  
This video describes how to build SharePoint 2010 artifacts with Visual Studio 2010. (Length: 2:17)

SSIS Project Build - Command Line

  
We are trying to automate our Build and Deployment process for SSIS Packages. Can some one suggest me the way to perform the build and deployment using Command Line.

Visual Web Developer 2008 express project - where does it build to?

  

Hi,

I'm a .NET noob, so forgive this if it's a stupid question...

I'm doing some work on a small project inhereited from someone.  The project contains lots of .aspx and .cs files, as well as a web.config, .sln file etc etc.  I want to just try to open this in Visual Web Developer, compile it, upload the compiled files to a demo web server, then see if it has worked (i.e that the website runs on the demo server).  I know the source works as the person who sent it has uploaded it so far to the demo server, but I want to run it locally to make sure I can get the whole process of building working before I do any mods.

So I open the .sln file.  I hit 'build > build website'.  It says it has completed without any errors.  But now I want to look at the compiled source of these files to make sure the code there has changed such that the .aspx files now reference the compiled assembly rather than the code-behind.  But when I browse to the project in Windows explorer and open one of the .aspx files, it's still referencing the .cs code-behind - as if it hasn't compiled to an assembly.  I thought that once you build, all of the .aspx files have a reference to a dll, rather than a cs file?

I can only think the reason is that when you build a project, it builds it somewhere else?  Am

Making .NET Project Ready for Build from Perfoce

  

Hi,

I'm new to .NET. I've a project checked in to Perforce with single solution file. It has 3 different projects within it. One is ASP.NET, another is web service & another windows service.

Unfortunately, I do not have any build file. For example, I used to have a build file using ANT for all of my Java projects. I'm not sure if the similar functionality can be achieved in .NET. Say for example, by running this build file, it'll create a folder C:\project which will contain my source code in appropriate format. It won't be a truly build file because the source will not be compiled. What I need is that it should put libraries in appropriate folders. I've 3rd party DLL such as log4net.dll & then I've Web References to 3rd party URLs, etc. So, basically, it'll gather those references & then copy source code in C:\project directory along with solution file. And then, I can open this solution file from C:\project in Visual Studio & build it from Visual Studio. Can any one tell me how to achieve it?

Thanks!


Error 1 Cannot publish because a project failed to build ? Click Once Deployment issue while publis

  

H! friends

Error  1 Cannot publish because a project failed to build ? Click Once Deployment issue while publishing the application ?

Can anyone tell me how to fix this problem? gone trhough many posts on net but didnt get the right solution for this ? If yu know how to fix this problem tell me plz? or any resource which can guide me to sucessful publishing

 

Pleas reply

 

Thanks

Regards

Vijay Gaur

 


Resetting properties in web deployment project based on custom build config file

  

I'm trying to create a general build environment for multiple projects that can take a some command line parameters and execute a build based on a custom config file.

The problem I am having is after I read in the config parameters with MSBuild.Community.Tasks XMLQuery, which works fine, I can't get aspnet_complier to see these parameters.

I keep getting "error MSB3462: Either MetabasePath or VirtualPath must be specified."

 Here is my project file:

<Project InitialTargets="PreMessage" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 
 
   <Target Name="PreMessage">
    <Message Text="Building..." />
   </Target>
 
 <PropertyGroup>
  <PreBuildEventDependsOn>
   PreBuild;
  </PreBuildEventDependsOn>
  <PrepareForBuildDependsOn>
   PreBuild;
  </PrepareForBuildDependsOn>
  <BuildDependsOn>
   PreBuild;
   $(BuildDependsOn)
  </BuildDependsOn>
 </PropertyGroup>
 
 <Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tas

Use jQuery and ASP.NET AJAX to build a client side Repeater

  
By sending only data to the client, you can profoundly reduce the size of what you send and see a substantial increase in performance. You also allow yourself the ability to easily add features like light-weight sorting and paging on the client. This can not only improve your users' experience, but reduce server load and bandwidth requirements.

Use jQuery and ASP.NET AJAX to build a client side Repeater

  
By sending only data to the client, you can profoundly reduce the size of what you send and see a substantial increase in performance. You also allow yourself the ability to easily add features like light-weight sorting and paging on the client. This can not only improve your users' experience, but reduce server load and bandwidth requirements.

To that end, I'm going to walk you through these four steps to effectively implementing a client side Repeater, using ASP.NET AJAX and jQuery:

Project Example: ASP.NET MVC + SubSonic Architecture

  
use of SubSonic to provide the DAL in association with some ASP.NET MVC sites and was waylaid in my original intent to throw up a post summarizing the architecture we're using for the effort. Well I've finally gotten around to it. Recall that in his fake it till you need it post, Dave provided a window on our architecture that I'll build upon here

Use jQuery and ASP.NET AJAX to build a client side Repeater

  
By sending only data to the client, you can profoundly reduce the size of what you send and see a substantial increase in performance. You also allow yourself the ability to easily add features like light-weight sorting and paging on the client. This can not only improve your users' experience, but reduce server load and bandwidth requirements.

VS2010 Professional .NET 4.0 Remote Debugging ASP Website Project

  

Trying to remote debug ASP website from VS2010 Pro to Windows Server 2003 machine.  Specifically, trying to debug a Web Service, but breakpoint says, "The breakpoint will not currently be hit. No symbols have been loaded for this document."  This happens for all compiled code though.  I have read this is due to missing PDB files and the work around is to manually copy them, as noted here.  Problem is, I cannot find any PDB files for my project, except referenced libraries, which I can remote debug.

Verified

  • web.config has <compilation debug="true">
  • Debugger is attached to wewp.exe process on remote server
  • Installed VS2010 remote debugger from DVD (as I can remote debug referenced libraries)

This is beyond frustrating.  I migrated my code from VS2008 .Net3.5 to VS2010 .Net4.0 to take advantage of the inherent multithreading framework.  Debugging works when using local host and was stable until deployment to test server.

Thanks in advance,

Anthony


How can I be sure that my entire project is up-to-date and free of errors in VS2010?

  

Seems like a stupid question, but I will go to Build > Build Solution many many times and the build will succeed many many times, then I will put in a minor syntax error and the build will fail, BUT the build will not fail because of the minor syntax error; it will fail because of an unresolved type that I put in about twenty compiles ago. And then I will fix the minor syntax eror, and the compiler will still complain about the unresolved type. Here is my code:

<%@ Register TagPrefix="FTB" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>
<html>
<body>
  <form runat="server">
  Hello World!!  
</form>
</body>
</html>

Pretty simple, really. I go to Buld > Build WebApplication1 and it runs OK. Now, if I put in a minor syntax error, such as substitute "forrrrrrrm" for "form" and then try to Build Solution, it complains not about the misspelled word, but about the FreeTextBox. And then if I correct the misspelled wird, it still complains about the FreeTextBox. Which leads me to believe that Building the Solution does not check absolutely 100% everything that needs to be checked. Is there a more thorough way of compiling a program that I need to use?


is it possible to convert whole visual studio 2008 web site project to visual studio 2010 web site p

  

is it possible to convert whole visual studio 2008 web site project to visual studio 2010 web site project

 

my current project references

 

 

 

i have a very annoying iis problem

iis server stops working until app pool is recycled

 

i am hoping that new visual studio (net framework 4.0) may solve this very annoying unsolveable problem

 


Business Intelligence Reports Project in Visual studio 2008 ?

  

Hi, 

I wonder how to add a project template called  Intelligence Reports, something like that, to Visual studio 2008. I have SQL 2008 installed. Do I need to install some updates to get Intelligence Reports template to Visual studio 2008 ?

Thank you..


build repository from SQL 2005? for a Linq, Jquery autocomplete

  

Hello,

  I have the a question am going about his correctly I have a database for categories, it has many fields and about 4000 records,  but with a Jquery autocomplete needing speed and the fact that I only need to return a key and category name. I did the following:  (oh just to note, MVC2, Ajax project)

someclass.cs

    public class categorySearch
    {
        public Guid Category_GUID { get; set; }
        public string Category_Name { get; set; }

    }

and now for the repository
Categoryrepository.cs

    public class categoryRepository
    {
        internal List<categorySearch> FindCategory(string searchText, int maxResults)
        {
            List<categorySearch> category = new List<categorySearch>();
            dbWebEntities storedb = new dbWebEntities(); 

            var getcat = storedb.Categories.ToList();

            foreach (var item in getcat)
            {
                category.Add(new categorySearch { Category_GUID = item.Cat_GUID, Category_Name = item.Category_Name});
            }

            var result = from c in category
                         where c.Category_Name.Contains(searchText)
                         orderby c.Category_Name
                       

Solution/project structure

  

Hello, I am working in a aspx web application that must be built in several separate "modules" with different functionality which will be partly developed by different teams.

However, I need the completed app to reside in ONE virtual directory. There will be a single startup page. I need session state to be preserved across pages in different modules.

I structured it as one solution with different Web Projects and one class library project with common functionalities.

Questions:

1) is this the right approach to do this? Or which one would be better?

2) each time I add a new web project to the solution, a new web.config gets created. What do I do and where do I put them?

VS 2010 + framework 4.0 + TFS

Regarding TFS and source control, I have a single Team project, the solution and web projects are inside it.

 

Thanks!


Best Way to Upgrade Using Web Setup Project

  

Hi there,

I am using VS2005.

I don't have much experience with web setup projects, but I now need to create a decent windows installer in order to allow customers to install one of our web applications. I have created a simple web setup project and it works fine, but not when it comes to upgrades of the application.

If for instance I install version 1.0 on a machine, and then later I try to install version 2.0, I don't seem to have the control that I would like... I can specify in the web setup project that the installer must enforce an uninstall of previous version, but then all application files and logs are uninstalled as well. If I let the application just install itself over the older version, it seems to leave some old DLL's there - it then causes issues in the application because DLL version conflicts.

My basic requirement is that I would like th installer to upgrade the old version with all the files required, but leave any application and log files in tact - this way the customer won't have to reconfigure the application after install.

What is the best way to handle this?


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend