Question

This is my 1st time deploying a C# project.

  • dev machine x64
  • targeted machine x86

Setup Project Launch Condition

  • .NET Framework 4

According to http://erikej.blogspot.com/2012/05/private-deployment-of-sql-server.html

applications targeting .NET 4.0, either .NET Framework 3.5 SP1 or the VC++ 2005 SP1 redistributable (for x86 and/or x64) is required.

So I have downloaded and installed VC++ 2005 SP1 redistributable x86 on client machine and since it is win 7 it includes .NET 3.5 SP1

I have published the app and even created the setup project It installs in the targeted machine without any problem but when I try to run the installed app it give me the following error.

Description:
  Stopped working

Problem signature:
  Problem Event Name:   CLR20r3
  Problem Signature 01: automobile repairs system.exe
  Problem Signature 02: 1.0.0.0
  Problem Signature 03: 52845d57
  Problem Signature 04: System.Data.SqlServerCe
  Problem Signature 05: 3.5.1.0
  Problem Signature 06: 4b743b2d
  Problem Signature 07: 15c
  Problem Signature 08: 12
  Problem Signature 09: System.Data.SqlServerCe.SqlCe
  OS Version:   6.1.7600.2.0.0.256.1
  Locale ID:    1033

Read our privacy statement online:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
  C:\Windows\system32\en-US\erofflps.txt

When developing I followed this article

And I didn't use Entity Framework 4

for weeks I've been referring to lots of articles but STILL no luck.

I even search online a solution but nothing actually works

  • I cleaned the registry and reinstalled the app
  • Tried uninstalling and restart the machine and then again installing the app

but still I'm missing something.

When I check the installation directory in client machine it displays

  • AMD64 folder with .dlls
  • X86 folder with .dlls
  • ARMS.sdf file
  • System.Data.SqlServerCe.dll

What am I doing wrong please help me out.... Thank you so much in advance.

Was it helpful?

Solution

I Finally came up with the solution a very simple solution but took me some time.

First I installed Visual Studio to the client machine then I debugged the app which gave me the exact exception. Then added a new code to print more details on the error then finally after understanding the exact issue causing the error "Cant access the .sdf" I changed the access property of the .sdf to full control to the currently logged in profile and again when I run the app it gave me no errors :) For More details on how I solved it visit my blog

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top