Showing posts with label .NET Development. Show all posts
Showing posts with label .NET Development. Show all posts

Tuesday, April 5, 2016

Visual Studio Express 2015–File names and sizes

With Visual Studio 2015, there are three free-to-use Express editions made available that can be used by individuals as well as enterprises.

Although there are no .ISO files provided, it’s possible to download the installation files by passing the /layout argument to the appropriate installer.

Two surprises:

  • The files names of the web installers are not very intuitive.
  • The offline folder sizes are bigger than what you would expect (with VS 2015 Update 2).

Here’s a table of the file names and offline folder sizes:

Product (Update 2)

Size (offline folder)

VS Express 2015 for Windows Desktop
(wdexpress_full_ENU.exe)

7.11 GB

VS Express 2015 for Web
(vsn_full_ENU.exe)

5.44 GB

VS Express 2015 for Windows 10
(winexpress_full_ENU.exe)

7.25 GB

--Neno

Friday, June 21, 2013

How to append/remove trailing slash in an URL?

aspnetYou might want to use the System.Web.VirtualPathUtility  class (from System.Web.dll), which has methods like:

--Neno

Thursday, June 20, 2013

Configure for Web Deploy Publishing menu item missing in IIS Management Console

iis_logoLuckily, there is a solution:

  1. Use Web Platform Installer and install
    “Web Deploy 3.0 for Hosting Server”.
  2. Restart IIS Management Console.

Good luck!

--Neno

Monday, August 8, 2011

A better alternative to ILMerge

There's a great alternative to ILMerge available.

From the ILMerge homepage at MS Research:

A Great Alternative to using ILMerge

If you cannot use ILMerge because you are trying to merge WPF assemblies, then here is a great way for you to get the same effect, courtesy of Jeffrey Richter: embed the dlls you want to merge as resources and load them on demand! In many ways, this is a better technique than using ILMerge, so I strongly urge you to check it out, even if ILMerge is working for your scenario.

The alternative solution is part of Jeffrey Richter's book CLR via C# CLR via C#, Third Edition (Microsoft Press, 2010; ISBN: 9780735627048), you can read about it there:

http://blogs.msdn.com/b/microsoft_press/archive/2010/02/03/jeffrey-richter-excerpt-2-from-clr-via-c-third-edition.aspx

How does it work?

It adds the required .DLLs as embedded resources to the primary .EXE file and uses AppDomain.AssemblyResolve to return the assemblies.

This is what Mike Barnett (the creator of ILMerge) says about it:

As the author of ILMerge, I think this is fantastic! If I had known about this, I never would have written ILMerge.

Many people have run into problems using ILMerge for WPF applications because WPF encodes assembly identities in binary resources that ILMerge is unable to modify. But this should work great for them.

Monday, March 21, 2011

Get rid of Visual Studio Setup Projects as they will be discontinued in future

Visual Studio setup projects are dead. Not sure anyone will cry...Buck Hodges informs us that there will be no Visual Studio setup projects (vdproj) in future versions of VS.

Future versions of Visual Studio will not include the Visual Studio Installer project templates. To preserve existing customer investments in Visual Studio Installer projects, Microsoft will continue to support the Visual Studio Installer projects that shipped with Visual Studio 2010 per the product life-cycle strategy. […]

Related Links:

Tuesday, August 24, 2010

Updated: Visual Studio 2010 Image Library

Visual Studio 2010's icon library had a big update!Make sure you check out the new Image Library that gets installed with Visual Studio 2010. It was updated and contains many great-looking icons and images that are free to be used even in commercial software.

Link: Install the Visual Studio Image Library

144 MB of high-res icons

Source: http://blogs.msdn.com/b/visualstudio/archive/2010/03/29/tips-and-tricks-visual-studio-2010-image-library.aspx

Friday, August 20, 2010

Certified as Professional Scrum Developer Trainer

"A fool with a tool, is still a fool."

TFS is a great tool, but still it doesn't tell you how to do things. To close the missing gaps you need practices and a framework (like Scrum). Luckily, Scrum.org and Microsoft started the Professional Scrum Developer Program (PSD), which trains people in all three topics.

An ideal combination:

ProfessionalScrumDeveloper_500pxScrum + TFS + modern Practices

Additionally this will be the only official course on Visual Studio 2010 team features and Team Foundation Server 2010 autorized by Microsoft (no MOC courses).

Since this summer, I 'm certified as Professional Scrum Master (PSM) and as one of the Professional Scrum Developer Trainers (PSDT) that will be teaching the course.

ScrumDeveloperTrainer_500px

Neno Loje now is a Professional Scrum Developer Trainer 

Links:

Tuesday, August 17, 2010

Lookup .NET Format Strings

Format Strings in .NET - for easy and safe string formatting{0:N2} – N2 stands for a number with 2 decimals.

I wish I could remember all those – if you can't, look them up at:

Monday, August 16, 2010

Download Tip: Create Regular Expressions in a snap

I have almost no clue about Regular Expressions, but still I can create even pretty complex RegEx patterns in a snap and therefore can impress collegues with those (almost non-existant) skills.

How do I do that, you will ask?

Well, I use Expresso Regular Expression Tool

It's free (although you have to register after a period to receive your free registration code) and helped me a lot. Highly Recommended!

Expresso makes creating regular expressions a snap

Saturday, July 24, 2010

SOLVED: The provided URI scheme 'http' is invalid; expected 'https'. Parameter name: via

HTTPS worked, but now it complains if I change to HTTP...You receive the error message:

The provided URI scheme 'http' is invalid; expected 'https'.
Parameter name: via

… while using WCF to connect to an endpoint.

Probably you are trying to send a a username and password to authenticate although the connection is not secure (no HTTPS).

This modified binding should help:

<binding name="UserPasswordBinding">
security mode="TransportCredentialOnly">
transport clientCredentialType="Basic" />
/security>
/binding>

Wednesday, June 30, 2010

.NET Framework 4 Client Profile available through Windows Update

.NET Framework now served through Windows Update

Beginning June 22, 2010 the .NET Framework 4 is available through WIndows Update to ease deployment.

The whole framework? No, only the "light" version, so called "Client Profile", which contains the features to develop a client application, including:

Common language runtime (CLR)

ClickOnce

Windows Forms

Windows Presentation Foundation (WPF)

Windows Communication Foundation (WCF)

Entity Framework

Windows Workflow Foundation

Speech

XSLT support

LINQ to SQL

Runtime design libraries for Entity Framework and WCF Data Services

Managed Extensibility Framework (MEF)

Dynamic types

Parallel-programming features, such as Task Parallel Library (TPL), Parallel LINQ (PLINQ), and Coordination Data Structures (CDS)

Debugging client applications

It does not include (meaning you still need to install the full .NET Framework 4.0 to use those features), for example:

ASP.NET

Advanced Windows Communication Foundation (WCF) functionality

.NET Framework Data Provider for Oracle

MSBuild for compiling

Now, it's on Windows update, will it install automatically?

It depends on the Windows Update settings, "the .NET Framework 4 Client Profile is released as a recommended update that may be installed automatically on Windows Vista and Windows 7. The Client Profile is released as an optional update for Windows XP. In Windows XP, you must manually run WU and select the .NET Framework 4 Client Profile".

.NET Framework 4 Client Profile:

  • Recommended Update on Windows Vista/7
  • Optional Update on Windows XP

Full .NET Framework 4:

  • Optional Update on Windows Server 2003, Windows Server 2008 and on Windows Server 2008 R2

More Information?

Monday, June 28, 2010

SMTH-AUTH errors with System.Net.Mail

net_v_webIf you are getting SMTH AUTH errors while trying to send e-mails using the SmtpClient to an smtp server that requires authentication, make sure that you call UseDefaultCredentials before settings the credentials.

So, order is important here!

using System.Net;
using System.Net.Mail;
...
using (var client = new SmtpClient())
{
client.Host = "smtp.teamfoundationserver.de";
  client.Port = 25;
client.UseDefaultCredentials = false;
client.Credentials = new NetworkCredential(username, password);
client.Send(message);
}

Good luck!

Code Contracts: don't forget to turn them on

dd491992_codecontracts_project(en-us)

If you use the new System.Diagnostics.Contracts classes like

int Div(int a, int b)
{
  Contract.Requires(b > 0);
  return a / b;
}

Do not forget to download the Code Contracts tool and turn on static and/or runtime checking of your code.

Otherwise the Contract.Requires statement above will just be ignored (thus the second parameter will not be checked)…

Notes:

  • If you use Contract.Requires<TException> you will receive an assert message telling you that you need to use the rewriter
    image
  • Alternatively, leave your pre-conditions as old-fashoned if-then-throw-statements, and end them with EndContractBlock, (contract tools recognize them as legacy-require statements).
    Beispiel aus den FAQs:

    void MyMethod(Foo foo)
    {
       if (foo == null) throw new ArgumentNullException(...);
       Contract.EndContractBlock();
       ... normal method code ...
    }

Setting Attribute value in VB.NET XML Literals

ms_net_rgb_webYou the receive compile error when using XML literals and try to set an attribute using quotation marks…

Error message: "Expected matching closing double quote for XML attribute value."

Your code might look similar to this fragment:

Results in an error:

Dim output = From item In items
  Select <Item ID="<%= item.ID %>">
  </Item>

What's wrong? Just Remove the quotation marks. The <% %> syntax will insert them later.

Works fine:

Dim output = From item In items
  Select <Item ID=<%= item.ID %>>
  </Item>

The result as XML:

<Item ID="1">
</Item>
<Item ID="2">
</Item>

Sunday, June 27, 2010

Visual Studio 2010 Keyboard Shortcuts Poster

VS_h_rgb

Reference cards for the default keybindings in Visual Studio 2010 for Visual Basic, Visual C#, Visual C++ and Visual F#

Download from Microsoft: Visual Studio 2010 Keybinding Cards

image

Wednesday, June 2, 2010

Monday, November 9, 2009

CustomValidator for Checkboxes in ASP.NET

To check that a checkbox is set in ASP.NET you need to do a little more than just grab a RequiredFieldValidator.Situation:

The RequiredFieldVadlidator cannot be used to validate ASP.NET Checkboxes.

Workaround:

Use a CustomValidator. All you need is implement the ServerValidate event of the Custom Validator to validate that the check-box is checked/unchecked. Read more: http://msdn.microsoft.com/en-us/library/aa479013.aspx

Thursday, October 29, 2009

10 free online Tutorials on Silverlight using Blend

(via techpreacher)

These tutorials are for everyone wanting to get to know Silverlight and Expression Blend quickly.  The tutorials have been created to learn about the features of Silverlight by simply drawing, resizing, dragging and dropping elements on the design surface of Blend. No code or prior Silverlight knowledge needed.

The content is provided at a high-level to cover a wide array of topics in a short time. Links to more detailed information are provided at the end of each tutorial.

1. Drawing an emoticon in Expression Blend
First steps in getting to know the tools and workspace in Blend
2. Element Transformations
Learn to use Scale, Rotate, Skew and 2.5D Transformations
3. Get Started with Animation
A Quick Overview on Creating Time-Based Animations
4. Playing Video with the MediaElement
Using the flexible MediaElement control as a reusable Surface
5. Arranging Pictures to Learn Layout
Use the Grid, StackPanel, ScrollableViewer and Border to position Images
6. A Look at Text in Silverlight
Learn about Displaying Text, Font Properties and Embedding Fonts
7. Import an Adobe Photoshop File into Blend
Convert the assets from a Photoshop file into Interactive Controls
8. Styling and Skinning Controls
Customize the Look by Setting Properties and Building Templates
9. Styling and working with Design-Time Data
Explore how Templates and Bindings are used to display dynamic data

10. Giving Behaviors a Test Drive
A brief overview and walkthrough of the Behaviors included with Blend

Friday, September 18, 2009

Workaround: Windows SDK Configuration Tool complains about missing Visual Studio

When trying change the default SDK…

Symptoms

Error Message:

"Your system does not have Visual Studio 2005 or Visual Studio 2008 installed"

Workaround

  • Option 1: Use the command-line version of Windows SDK Configuration Tool: e.g. “WindowsSdkVer.exe -version:v7.0” (no quotes)
  • Option 2: Change the OS Display Format to English (United States).

You can read the full story here.

Friday, August 28, 2009

Getting started with Developing for Windows 7

Windows 7 offers several features for developers, not just users

Getting Ready for Windows 7

Windows 7 Training Kit For Developers
(includes presentations, hands-on labs, and demos on: the Windows 7 Taskbar, Libraries, Multi Touch, Sensors and Location, Ribbon, Trigger Start Services, Instrumentation and ETW, and Application Compatability - including Version Checking, UAC Data Redirection, Session 0 Isolation, Installer Detection, User Interface Privilege Isolation, High DPI)

Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1
(provides documentation, samples, header files, libraries, and tools)

Windows® API Code Pack for Microsoft® .NET Framework
(Managed Wrapper for accessing Windows 7 features from .NET)