Total Pageviews

Search This Blog

Showing posts with label VS2008. Show all posts
Showing posts with label VS2008. Show all posts

Sunday, June 19, 2011

Update - Tip - Visual Studio 2010 Ultimate and Dynamics AX .Net Business Connector Compatibility Settings

Issue:

I bumped into this error when building my .Net app (using Visual Studio 2010 Ultimate)  which consumes Dynamics AX 2009 (.Net Business Connector assembly)

 Solution -

Update - In my specific scenario, I'm not leveraging any of the .Net 4.0 Framework features, so I just changed the Framework Version to 3.5 to make this work.



But, if you are targetting .Net 4.0, you need to perform an additional change in config after you change the Framework version to 4.0 otherwise you will run into the following error:

"Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information"

In order to fix this error, just add this specific entry in your app.config under configuration section:
startup useLegacyV2RuntimeActivationPolicy="true", so now your modified app.config should look like the below:

And you should be good to go now with .Net 4.0!

P.S Florian has a theory on .Net 4.x compatibility with AX 2009 BC in his blog , but without making this additional change in config as I have shown above, it won't work and as said before I was just using a basic .Net 3.5 targetted app just to test one of my AX BC Classes

Saturday, June 13, 2009

X++ v/s C# Comparison

Link from MSDN on X++ v/s C#
http://msdn.microsoft.com/en-us/library/cc967423.aspx

Tuesday, May 19, 2009

Download Visual Studio 2010 Beta and .Net Framework 4.0

Visual Studio 2010 and .Net Framework 4.0 is available for download from the following link
http://msdn.microsoft.com/en-us/subscriptions/downloads/default.aspx?pv=18:370

Sunday, March 8, 2009

Troubleshooting Missing Project Templates in VS 2008

I faced this problem of Missing Project Templates (All of them except the Analysis and SSIS and Build Project templates), after installation of Visual Studio 2008 on my notebook which runs Windows Server 2008.

Solution - Run DevEnv /InstallVSTemplates from Visual Studio Tools Command Prompt to restore all the project templates.

Friday, January 23, 2009

Sync with Windows Mobile Device on Windows Server 2008

Recently, I was trying to use Microsoft Active Synch 4.5 to Synch my Windows Mobile with my laptop OS i.e. Windows Server 2008.

But, it seems it doesn't work that way.

Solution - Windows Server 2008 supports in built feature that is Windows Mobile Device Center 6.1. In order to make this work, you need to Add an option feature called "Desktop Experience". This you can find in Administrative Tools > Server Manager > Features > Add Feature > Check mark Desktop Experience and there you go.

Thursday, October 30, 2008

Visual Studio 2010 Editor/IDE

Hi, Some cool pics from the recently conducted PDC'08 . This one shows about xml comment in VS 2010. The editor is cool and built on WPF.

http://flickr.com/photos/longzheng/2982612672/in/photostream/

Thursday, October 16, 2008

Troubleshooting WCF WebService

Recently while developing a WCF Service for AX Employee Data, came across this particular
Error:
Type 'System.Xml.XmlDocument' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute.

Resolution:
Put xmlserializerformat just above your datamethod in your interface class.
[OperationContract]
[XmlSerializerFormat]
XmlDocument GetEmployees();

Sunday, September 14, 2008

DAX 2009, WCF Service and Windows Mobile



I was working on a small POC which consumes a WCF Service to update DAX 2009 Employee data.




This WCF Service in-turn consumes a legacy ASMX Service to talk to a different application and loads the data from that webservice. And, later the data is updated to DAX 2009.




These are the 2 steps:


Step A: Windows Mobile Loads the data from a WCF Service which in turn invokes the Business Logic Layer which calls the Data Access Layer (this layer consumes the legacy asmx webservice of the external app)























STEP B: Updates Data to AX 2009



Wednesday, April 9, 2008

Debugging AX via .Net Business Connector

In this blog, I will take you through a step-by-step debugging approach using .Net Business Connector.
Note: The .Net code is extracted from a custom solution which we built to hear to MSMQ messages and then logon to AX and pass on the message to an AX API.
Step1:
Launch Vision Connector Test Application (Start => Programs => Vision Connector => Vision Connector Test Application).
Note: Make sure message queues are set properly in Send queue and Receive queue.






Step2:
Launch TestVisionConnector.sln (.Net Solution) using VS 2005. Insert a breakpoint by going
to the event VICO_NewMessageXML and press F9 key.

Step3:
Press F5 key inorder to initiate the debugging process. Now, a window will open and the status of the title bar for the project will show Running.









Step4:
Launch Microsoft Dynamics AX and Navigate to AOT/Classes/ VCMSMQMgt as shown below:
Tip: Press “Ctrl + D” key to launch AOT (Application Object Tree) in AX.










Step5:
Open Class VCMSMQMgt and go to the method NewMessageXML and press F9 key to insert a breakpoint.







Step6:
Launch Debugger in AX by going to Tools => Development tools => Debugger as shown below:











Step7:
This should open a new Debugger Window as shown below:








Step8:
Start the communication flow by sending a request from the test application i.e. by pressing the “Send Request to Queue” button shown below:














Step9:
Automatically, the breakpoint will be hit in TestVisionConnector application. (.Net solution).









Step10:
Step over the code line by line by clicking the F10 key till the execution reaches the following line:
axobj.Call("NewMessageXML", InXML.xml);










Step11:
Now, press F11 key to step in to AX Debug environment.









The above steps completes one cycle of debugging through the entire communication chain between Vision connector test application to Dynamics AX routing via .Net code.

Wednesday, March 5, 2008

Attended Launch Event of Windows Server 2008, SQL 2008 and VS 2008

Hey Folks, It was a great event hosted by Microsoft @Bangalore.
A great welcome note was addressed by Somasegar, Senior VP, Microsoft about the 3 products.
He spoke about Windows Server 2008, Visual Studio 2008 and SQL Server 2008 and further there were some good demos by each of the product specialist.

Got to know about:
- Virtualization
- Security Aspects
- SQL 2008 Spatial/geography datatype
- Performance
- Resource Governor
- Business Intelligence
- XAML

- Silverlight
- JavaScript Intellisense and Debugging
- Microsoft Expression Blend... and much more

Also, prizes were distributed to contest winners. These lucky winners got a voucher for laptop and out of those 10 winners 3 of them got the chance to go to the Tech-Ed 2008 @ Orlando.

Also, all the attendes were lucky to get a 1 GB pen drive + evaluation copies of Windows Server 2008, VS 2008 Team Suite.

And finally, they screened "Transformers". Kudos to Microsoft and keep it up! A very well-arranged event.







Wednesday, February 20, 2008

Launch Event of Microsoft Windows Server 2008, Visual Studio 2008 and SQL Server 2008

Please register here.
http://www.microsoft.com/heroeshappenhere/register/default.mspx

I'm lucky to get the confirmation and the event will be on 4th March 2008, Bangalore (Rex Theatre). Will post more about it once I come from there.

Monday, February 4, 2008

Getting Started with my first LINQ program

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
// The Three Parts of a LINQ Query:
// 1. Data source.
int[] numbers = new int[7] { 0, 1, 2, 3, 4, 5, 6 };
// 2. Query creation.
// numQuery is an IEnumerable
var numquery =
from num in numbers
where (num % 2) == 0
select num;

//3. Query Execution
foreach (int num in numquery)
{
Console.Write("{0,1}", num);
}
}
}
}

LINQ - Language Integrated Query

LINQ is a programming model that introduces queries as a first-class concept into any Microsoft .NET language.

LINQ is a methodology that simplifies and unifies the implementation of any kind of data access. LINQ does not force to use a specific architecture but it facilitates the implementation of several existing architectures for accesing data.


You can download free e-book regarding LINQ from the following site:
http://introducinglinq.com/

Tuesday, January 29, 2008

How to invoke .NET Assembly from SQL Server 2005

Steps

1. Write a C# assembly which will have a simple method called "HelloWorld" which will take a string as argument and will return the string concatenated with "Hello".

2. Build the assembly

3. Open SQL Query Analyzer and


CREATE ASSEMBLY asmHelloWorldSQL FROM 'c:\HelloWorldSQLAssembly.dll'

Note: asmHelloWorldSQL is name of assembly which can be anything and we have to pass the path where the assembly resides

4. Create a function which will reference the assembly we created


CREATE FUNCTION dbo.clrHelloWorld
(
@name as nvarchar(200)
)
RETURNS nvarchar(200)
AS EXTERNAL NAME [asmHelloWorldSQL].[HelloWorldSQLAssembly.Class1].[HelloWorld]

Note: This function will invoke the HelloWorld method from the assembly and return the string.

5. SELECT dbo.clrHelloWorld('Invoke from SQL 2005')
and,
this will return

"Hello Invoke from SQL 2005"

Happy assembling :-)