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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Visual Studio doesn't build with InternalsVisibleTo if using a CodeActivity within the same assembl

Posted By:      Posted Date: September 24, 2010    Points: 0   Category :Windows Application

I have unit test projects to test some workflows. So I have some InternalVisiblesTo in my main project so my test project can call them. But when I do workflows (.xaml) in the test project using some codeactivity also defined into the test projects, the build doesn't see the InternalVisiblesTo attribute and I get errors like this one :

Error 1 'BugVSInternalVisiblesTo.Class1' ne contient pas de définition pour 'Method1' c:\Projects\BugVSInternalVisiblesTo\ActivityLibrary1\CodeActivity1.cs 9 41 ActivityLibrary1

Here are the steps to reproduce easily my case :

1- Create a C# Class Library project with this code :

using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo ("ActivityLibrary1")]

namespace BugVSInternalVisiblesTo
  public static class Class1
   internal static void Method1 ()

2 : Create a new C# Workflow ActivityLibrary project named "ActivityLibra

View Complete Post

More Related Resource Links

Test: Build Quick and Easy UI Test Automation Suites with Visual Studio .NET


The .NET Framework provides a surprising new way to quickly and easily create user interface test automation. By using objects in the System.Reflection and System.Threading namespaces, you can write automated tests in minutes instead of hours. This article walks you through the building of a typical Windows-based application that will be used as the test subject. The author then runs through the creation of a C#-based test tool that simulates clicking the test app's UI controls and checks the application's state. After the tool is built, the author explains in detail how it works so you can modify and extend it for your own use.

James McCaffrey

MSDN Magazine January 2003

C#: XML Comments Let You Build Documentation Directly From Your Visual Studio .NET Source Files


C# allows developers to embed XML comments into their source files-a useful facility, especially when more than one programmer is working on the same code. The C# parser can expand these XML tags to provide additional information and export them to an external document for further processing. This article shows how to use XML comments and explains the relevant tags. The author demonstrates how to set up your project to export your XML comments into convenient documentation for the benefit of other developers. He also shows how to use comments to generate help files.

J. Andrew Schafer

MSDN Magazine June 2002

Visual Studio .NET: Build Web Applications Faster and Easier Using Web Services and XML


Visual Studio .NET includes exciting features, some of which are enhancements to previous versions and some of which are brand new. A few of the most significant additions are the new Microsoft programming language called C#; a new, smarter integrated development environment; new object-oriented features in Visual Basic .NET; and development lifecycle tools. This article provides an overview of these features, as well as a look at Web Services, Web Forms, and new versions of ADO and ASP. It takes a first look at dozens of important new Visual Studio features that aid in the design, development, testing, and deployment of solutions built with Visual Basic, C++, Visual FoxPro, and C#.

Dave Mendlen

MSDN Magazine September 2000

Out Of Memory during build in Visual Studio

Hi All,I have Visual Studio 2005 SP1, Win XP SP 2 on a machine with 2GB physical memory and over 200 GB free hard disk.I am getting out of memory exceptions from visual studio while building. It used to happen once a week or so, but now the frequency is up to 3-8 per day. It is getting insanely painful. The only way that I can seem to fix it is by restarting visual studio - which ends up being 5-15minutes of waiting. So as you can imagine - being forced to restart visual studio every couple of hours really sucks. The other people in my team get the same thing so it is not something specific to this machine.I am working on a fairly big solution - it has 102 projects including libraries, wcf services, some asp.net web services and a few client executables. Every time I get out of memory, there is always heaps of free memory reported by the task manager. Visual studio itself is using between 400-700 mb of memory and there is always 700-1.2 GB free physical memory.So, it manifests as a build error most frequently (occasionally it happens in the designer and other places - but I'll forget that for now since it is only once or twice a week) - randomly with no warning I get the build error:The "ResolveManifestFiles" task failed unexpectedly.System.OutOfMemoryException: Insufficient memory to continue the execution of the program.   at Microsoft.Build.Tasks.Deployment.Manife

Why doesn't Visual Studio support MSIL as a first class language?


I'm dissapointed that Visual Studio (I'm running VS 2008) doesn't support IL as a project language, so that we can select it when starting a new project. We could then edit/assemble in VS and build debug test etc just like any other language. There seems to be no support for this either from MS or as an add-on.

The main motivation is to ease the development of dynamic methods, where we can actually see the stack, operations, memory etc in a proper debugger, right now developing dynamic methods is hit and miss, and very time consuming to debug (because the only assembler we can see in VS is native CPU !)

Also even if I debug C# code and select assembler in the source window I do NOT see IL assembler, only the jitted native assembler.

Is there any way to debug IL as IL, and see the stack etc etc?


SQL query gives results, but Visual Studio doesn't



I have problem accessing data from SQL query in ASP.net. I checked the query and it returns two fields, both with data, but when I run the same query in Visual Studio I get the following error: "Invalid attempt to read data when no data is present."

The problem is that data does exist...

This is what SQL query returns when executed on SQL Server Management Studio (I bolded the different header so you can see the difference):

url idClanak
Upload/Default2.png 8
Upload/Default3.png 8
Upload/Catrinel Menghia 7.jpg 8

The following is the ASP.net code (I bolded the piece of the code that apparently has some problems):

    private void Upisivanje(int idClanak, string naslov, string datumString, string kategorija, string autor, string slika, string opisSlike, string sadrzaj)
        string facebook = "<a href='http://www.facebook.com/sharer.php?u=" + Request.RawUrl + "&t=" + naslov + "'><img src='Images/Facebook.png'/></a>";
        string twitter = "<a href='http://twitter.com/home?status=" + naslov + " na: " + Request.RawUrl + "'><img src='Images/Twitter.png'/></a>

Show codeanalysis messages in the build summary or log view(build detail screen in visual studio)

Is there a way to show  codeanalysis messages in the build summary or log view(build detail screen in visual studio).  Right now it run and output the details to an xml file. I would also like it to show in the detail view screen.  Thanks.

Can I use visual studio 2010 to build and deploy 2007 solutions?

Actually I have some 2007 code someone gave me.  I haven't used those external wsp builders for a long time.  I don't know if I can just use vs 2010.

Visual Studio doesn't draw properly.


When I load my Visual Studio (C++ 2010 Express and / or Visual Basic 2010 Express, it's even happened with Web Developer 2010 Express and C# 2010 Express), it never seems to work properly.

As I'm sure you know, at load a start page is meant to show with a list of previously opened projects and the latest news on the product, but for me its just a solid colour of purple from the background colour of the application. If I manage to load a project it does an initial refresh and seems fine, but when I scroll the code it doesn't refresh, the same can be said for when I goto edit the code.

I found that resizing the window and / or changing its maximized / minimized state generates a refresh and allows me to view changes, I've also found that restart my computer a few times or re-logging allows the VS collection to work fine. Interestingly it will work, but then if I close it for more than a few hours it stops, and vise-versa.

I've re-installed both C++ 2010 Express and Visual Basic 2010 Express at least twice, I also have the latest drivers and service packs.

Any help will be appreciated, I hate coding in Notepad++ and then debugging in VS.

Errors while Build the "Forms Authentication Sample" using Visual Studio 2010

Hi All,

      While Build the solution Custom Security Project getting Errors

I am using SharePonit 2010 with Sql Server 2008 R2.

1. I configured Reporting Services and able get the reports using with Windows authentication.

2. Now my web application is Claims Based. Using with Claims Based Auth i need to get the reports. Since 5months i had this task in pending.

I need to configure the Reporting Services using with Forms Auth.

For this  recently i read this link http://technet.microsoft.com/en-us/library/aa902691%28SQL.80%29.aspx#ufairs_topic1

After downloading Code file from above link opened .sln file and converted.

Here added reference 'Microsoft.ReportingServices.Interfaces.dll'  from   C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportServer\bin this path.

While i am going for build getting these two errors

 1. 'Microsoft.Samples.ReportingServices.CustomSecurity.Authorization' does not implement interface member 'Microsoft.ReportingServices.Interfaces.IAuthorizationExtension.CheckAccess(string, System.IntPtr, byte[], Microsoft.ReportingServices.Interfaces.ModelItemOperation)' C:\Program Files (x86)\Microsoft SQL Server\MSSQL\Reporting Services\Samples\Extensions\FormsAuthe

ASP.NET 4 and Visual Studio 2010 Web Development Beta 2 Overview

Many exciting changes for ASP.NET are coming in the .NET Framework version 4. This document gives an overview of many of the new features that are included in the Beta 2 release of the .NET Framework 4 and of Visual Studio 2010.

Visual Studio 2010 Beta 2

This is a big deal. This isn't ".NET 3.6" - there are a lot of improvements of .NET 4, and it's not just "pile on a bunch of features so you get overwhelmed." I've been working with and talking to many of the teams involved and even though it's a cheesy thing to say, this is a really customer-focused release.

ASP 4 - Whirlwind Tour around .NET 4 (and Visual Studio 2010) Beta 1

There's a lot of stuff that's new and added in .NET 4, but not in that "overwhelming-I-need-to-relearn-everything" way. More in that, "oh, this is way easier/simpler now" way. Like, moving data around with ADO.NET DataServices is easy, binding with client templates is easy, there's F# if you need it, the "dynamic" keyword if you need it, Silverlight's already installed, oh, and the parallel stuff will freak you out, but in a good way.

Short Overview of SharePoint Features in Visual Studio 2010

As you probably know, Visual Studio 2010 was announced earlier this week and it contains a lot of cool features and project templates for SharePoint developers. Below is a short overview for some of the SharePoint development related features and project templates.

Visual Studio Add-In for Web Parts Generation

This article will introduce you to a new Visual Studio 2005/2008 add-in that can be used for Web Parts generation based on a prepared ASCX control/template. The add-in should allow Web Part developers to easily make Web Parts using the Visual Studio HTML designer. It should save you a lot of time and make Web Part development an enjoying experience even for beginners.

This article is written in the form of a step-by-step tutorial. It will give beginners a chance to successfully make, deploy, and try their first Web Parts, and will save some time for advanced users as you can always run into challenges when working with SharePoint.

Code spelling checker extension for visual studio 2010

Building a spelling checker for source code as an extension for visual studio 2010.

Download and Share Visual Studio Color Schemes

The good news is that Visual Studio allows you to completely customize the editor background and text colors to whatever you want - allowing you to tweak them to create the experience that is "just right" for your eyes and personality. You can then optionally export/import your color scheme preferences to an XML file via the Tools->Import and Export Settings menu command.
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