Five Steps to Add AppUp .NET SDK to Microsoft Visual Studio

6
Five Steps to Add AppUp .NET SDK to Microsoft Visual Studio* With the .NET SDK and support now available for the Intel AppUp developer program, here’s a brief overview of the SDK’s technical components, along with five quick steps how to add the.NET SDK to Visual Studio 2008. With the .NET SDK and support now available for the Intel AppUp developer program, here’s a brief overview of the SDK’s technical components, along with five quick steps how to add the.NET SDK to Visual Studio 2008. 1. Supported languages: The SDK supports the following languages and Microsoft Windows* graphical APIs: • C# for WPF (Windows Presentation Foundation) applications • C# for WinForms (Windows Forms) applications • Visual Basic for WPF applications • Visual Basic for WinForms applications 2. Supported Runtimes: 1. Microsoft .NET Framework 3.5 is only supported. 2. Applications that target .NET frame- work 4.0 will be rejected in Validation. 3. Intel AppUp™ Software Debugger: The Intel AppUp™ Software Debugger is a utility that emulates the Application Services of the Consumer Client. With Intel® AppUp developer program announces .NET SDK & IDE Plug-in for Microsoft Visual Studio The AppUp developer program launched support for .NET applications by releasing the .NET SDK, along with an IDE Plug-In for Visual Studio 2008. This plug-in reduces development time to integrate the AppUp SDKs and builds the MSI needed to submit your application for distribution and sales via the Intel® AppUpSM Center . The IDE Plug-in sup- ports both the C/C++ and .NET SDK for Microsoft Windows* when using Visual Studio 2008. the Intel AppUp TM SDK Plug-in 1.0 for Visual Studio 2008 software installed and the Intel AppUp TM SDK code included, you can test and debug your application without requiring the full client or access to hardware. 4. How to add the Intel AppUp .NET SDK in Microsoft Visual Studio 2008 Step 1: In Visual Studio, right click on Reference and use Add Reference from the shortcut menu to add the library to the project. [FIGURE A] Download the AppUp .NET SDK & IDE Plugin for Visual Studio Intel® AppUp SM developer program Provides developers with everything they need to create and sell their apps to users of millions of Intel® Atom™ processor-based devices. [FIGURE A] Intel® AppUp SM developer program Part of the Intel® Software Network 1 Originally published as a blog by Bob Duffy at : http://appdeveloper.intel.com/en-us/blog/2010/07/16/air-appup-what-developer-needs-know

description

 

Transcript of Five Steps to Add AppUp .NET SDK to Microsoft Visual Studio

Page 1: Five Steps to Add AppUp .NET SDK to Microsoft Visual Studio

Five Steps to Add AppUp .NET SDK to Microsoft Visual Studio*

With the .NET SDK and support now available for the Intel AppUp developer program, here’s a brief overview of the SDK’s technical components, along with five quick steps how to add the.NET SDK to Visual Studio 2008. With the .NET SDK and support now available for the Intel AppUp developer program, here’s a brief overview of the SDK’s technical components, along with five quick steps how to add the.NET SDK to Visual Studio 2008. 1. Supported languages: The SDK supports the following languages and Microsoft Windows* graphical APIs:

• C# for WPF (Windows Presentation Foundation) applications

• C# for WinForms (Windows Forms) applications

• Visual Basic for WPF applications

• Visual Basic for WinForms applications

2. Supported Runtimes:

1. Microsoft .NET Framework 3.5 is only supported.

2. Applications that target .NET frame-work 4.0 will be rejected in Validation.

3. Intel AppUp™ Software Debugger: The Intel AppUp™ Software Debugger is a utility that emulates the Application Services of the Consumer Client. With

Intel® AppUp developer program announces .NET SDK & IDE Plug-in for Microsoft Visual Studio The AppUp developer program launched support for .NET applications by releasing the .NET SDK, along with an IDE Plug-In for Visual Studio 2008. This plug-in reduces development time to integrate the AppUp SDKs and builds the MSI needed to submit your application for distribution and sales via the Intel® AppUpSM Center. The IDE Plug-in sup-ports both the C/C++ and .NET SDK for Microsoft Windows* when using Visual Studio 2008.

the Intel AppUpTM SDK Plug-in 1.0 for Visual Studio 2008 software installed and the Intel AppUpTM SDK code included, you can test and debug your application without requiring the full client or access to hardware. 4. How to add the Intel AppUp .NET SDK in Microsoft Visual Studio 2008

Step 1: In Visual Studio, right click on Reference and use Add Reference from the shortcut menu to add the library to the project. [FIgUrE A]

Download the

AppUp .NET SDK & IDE Plugin

for Visual Studio

Intel® AppUpSM developer program

Provides developers with

everything they need to create and

sell their apps to users of millions of

Intel® Atom™ processor-based devices.

[FIgUrE A]

Intel® AppUpSM developer programPart of the Intel® Software Network

1

Originally published as a blog by Bob Duffy at :http://appdeveloper.intel.com/en-us/blog/2010/07/16/air-appup-what-developer-needs-know

Page 2: Five Steps to Add AppUp .NET SDK to Microsoft Visual Studio

Step 2: Declare SDK Namespace and Integrate with the .NET SDK:

In the declaration section at the start of the C# source file, define com.intel.adp as a namespace. This frees you from having to add it as a prefix for SDK calls in your application. See the sample below:

///

using com.intel.adp;

///

Below is the sample code for C#. Paste in the Following code in the Initialization section:

try

{

AdpApplication app = new AdpApplication(new AdpApplicationId(0x11111111, 0x11111111, 0x11111111, 0x11111111));

/// Note: replace “0x11111111, 0x11111111, 0x11111111, 0x11111111” with the actual application ID

/// once you obtain it from Intel AppUp(SM) Developer Program web portal

}

catch (AdpException e)

{

if (e is AdpErrorException)

{

// TO DO: add your logic to handle the errors during initialization

MessageBox.Show(e.Message, “Error”);

System.Environment.Exit(1);

}

else if (e is AdpWarningException)

{

// TO DO: add your logic to handle the warnings

MessageBox.Show(e.Message, “Warning”);

}

}

Sample code for Visual Basic Winforms applications:

Declare the SDK namespace com.intel.adp using the Imports Statement shown below.

///

Imports com.intel.adp

///

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Try

Dim app As New AdpApplication(New AdpApplicationId(&H11111111, &H11111111, &H11111111, &H11111111))

‘ Note: replace “&H11111111, &H11111111, &H11111111, &H11111111” with the actual application ID

‘ once you obtain it from Intel AppUp(SM) Developer Program web portal

‘ To test Expired ID, use AdpConstants.ADP_EXPIRED_APPLICATIONID

Catch ex As AdpException

If TypeOf ex Is AdpErrorException Then

‘ TO DO: add your logic to handle the errors during initialization

MsgBox(ex.Message)

System.Environment.Exit(1)

ElseIf TypeOf ex Is AdpWarningException Then

‘ TO DO: add your logic to handle the warnings

MsgBox(ex.Message)

End If

End Try

End Sub

Step 3: Intel Appup Software Debugger:

The Intel Appup Software Debugger is only supported for Visual Studio 2008. The Intel Appup Software Debugger al-lows you to test and debug your applica-tion without requiring the full client or ac-cess to hardware. Below is the screenshot. [FIgURE B]

[FIgURE B]

Intel® AppUpSM developer programPart of the Intel® Software Network

2

Page 3: Five Steps to Add AppUp .NET SDK to Microsoft Visual Studio

Click on “Start the Intel Appup Software Debugger”. You will see the below window:

Debug your application. If the Intel AppUpTM SDK code is included you will see the below window:

INTEl APPUPSM DEVEloPER PRogRAM INCENTIVES THAT MICRoSoFT .NET DEVEloPERS CAN TAKE ADVANTAgE oF:

INTEl AToM DEVEloPER MIllIoN DollAR FUND

Through this fund, we support software developers and companies creating new experiences through applications for Intel® Atom™ processor-based netbooks.

INTEl APPUP DEVEloPER CHAllENgE

The contest is designed to encourage breakthrough applications that fundamentally change the user experience on a netbook featuring an Intel Atom processor. There are cash prizes and a 2011 Chevy* Volt* to be won.

lEgENDS

Want application visibility? The Legends program is a way to share the story behind the applications. get your app in and submit your story. Become a Legend.

INTEl BlACK BElT DEVEloPER SoFTWARE DEVEloPER

Share your knowledge and earn recognition for your contributions.

3

Intel® AppUpSM developer programPart of the Intel® Software Network

Page 4: Five Steps to Add AppUp .NET SDK to Microsoft Visual Studio

Step 4:Replace “0x11111111, 0x11111111, 0x11111111, 0x11111111” with the actual application ID once you obtain it from Intel AppUp(SM) Developer Program web portal and recompile the program. Step 5: Create an Installation Package:Create a “silent install” .MSI package that meets the Intel AppUpSM Developer Program packaging requirements. These requirements ensure that applications provide a good user experience during installation and Uninstallation. For a list of packaging requirements, refer to (http://appdeveloper.intel.com/en-us/article/packaging-requirements). For tips on packaging applications for Windows, refer to (http://appdeveloper.intel.com/en-us/article/how-creating-your-msi-instal...). You must wrap the AdpLibrary.dll library file into your application installer. The installer must copy the .dll file into the same folder where the application’s main executable is copied.

Note for VS 2010 developers:Intel Appup .NET SDK is tested only against Visual Studio 2008. However, if you are a Visual Studio 2010 developer you need to make sure your target .NET frame work is set to 3.5. Below are the steps

1. Change the .NET Target Framework from 4.0 to 3.5

Changing Target .NET Framework for C#: [FIgUrE E]

A. On the Project menu, click ProjectName Properties.

B. Click the Application tab.

C. In the Target Framework list, select .NET Framework 3.5.

Changing Target .NET Framework for VB [FIgUrE F]

A. On the Project menu, click ProjectName Properties.

B. Click the Compile tab.

C. Click Advanced Compile Options.

D. In the Target Framework (all configurations) list, select .NET Framework 3.5.

INTEl APPUP DEVEloPER PRogRAM – gETTINg STARTED

The getting Started guide is the good place to begin. Find tools and tips to start developing.

Developer guidelines

Validation Process

Submitting an Application

Developer Challenge

Porting to AppUp – resources & guides

Intel® AppUpSM developer programPart of the Intel® Software Network

4

Page 5: Five Steps to Add AppUp .NET SDK to Microsoft Visual Studio

2. Click on Publish->Prerequisites. Make sure Microsoft .NET Framework 4.0 is un-checked.

3. When creating the MSI using Visual Studio 2010 Setup project make sure you target to .NET framework 3.5. Right Click Setup Project->Prerequisites and uncheck Micro-soft .NET Framework 4.0 in the Prerequisites.

lEARN MoRE ABoUT DEVEloPER ToolS AND RESoURCES AT:

Intel® Software Dispatch – Delivering the latest advances in software technologies, de-veloper tools and resources and best practices.

Intel® Software Network

Intel® Software Development Products

More .NET SDK Resources • New AppUp Support for .NET

• Download the .NET SDK

• learn more about the .NET SDK for AppUp

• Brian Burrows reviews the SDK & new IDE Plug-in

• Download the Visual Studio AppUp IDE Plug-in (.MSI file)

• Building an MSI for AppUp (updated for .NET)

5

Intel® AppUpSM developer programPart of the Intel® Software Network

Page 6: Five Steps to Add AppUp .NET SDK to Microsoft Visual Studio

About the Author

Praveen Kundurthy Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus pellentesque consequat congue. Pellentesque ullamcorper, felis eget consectetur rutrum, quam metus vestibulum diam, a fermentum orci diam sit amet ipsum. Phasellus non lorem vitae dui vehicula interdum. Sed consequat, augue volutpat tempor blandit, tellus erat viverra lacus, ac luctus tortor augue vel neque. Nullam aliquet augue eget risus consectetur in feugiat arcu semper. Vestibulum vulputate diam id leo placerat adipiscing.

Nullam posuere elementum nisl non sollicitudin. Vivamus ligula magna, dapibus id dictum nec, viverra eget urna. Nam quis consectetur quam. Nunc ac nisl at velit ornare pulvinar. Pellentesque commodo commodo erat a sodales. Nulla ac leo lorem. Quisque pretium sollicitudin velit, ac facilisis est dapibus sit amet. Morbi elementum nunc vel turpis tristique sodales.

FPO

Intel® AppUpSM developer programPart of the Intel® Software Network

Copyright © 2010 Intel Corporation. All rights reserved.Intel® AppUpSM Developer Program | November 2010

*Other names and brands may be claimed as the property of others.

Additional Notes and Known Restrictions: • As of October 2010, the submission section of the AppUp developer program site will not include a selection for .NET. You can instead select Win

dows as with C/C++ submissions and include your .MSI as normal. The submission portal will be updated with a .NET option later 2010. • As of October 2010, the .NET SDK works with version 3.5 of .NET applications. Using version 4.0 may have an issue with this SDK and could fail

validation. It is recommended that applications use version 3.5 to ensure application validation and a good consumer experience.