Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Monday, February 27, 2017 10:02 PM
hello i have a problem, my c# application wont run on my another Computer without visual studio installed.
I used .net 4.5.2 , metro UI and entity Framework for my db.
When i try to run my .exe on another Computer, application run in task manager but the forms dont show up.
I have Windows 10 and the application was maked in Visual Studio 2015.
I try it with WIX, visual studio installer and with defoult publich tool in visual but noting changed my situation
Win 10 have .net 4.6 Framework installed by defoult and i installed .net 4.5.2 and 4.6.2 sdk
and on this picture u can see my runned app in task manager and noting on screen:
i think the metro UI make problems then i tryed to run diferent app without metro ui and its work good,
PLS help me ....
All replies (10)
Monday, February 27, 2017 10:04 PM
and in my publich setup i included all dll file
Monday, February 27, 2017 10:28 PM | 1 vote
Are you sure you want to create a Metro type application? If so, be aware that the recommended way of deploying Metro applications is through the Microsoft store.
You can try to deploy using a App Package, but I'm not sure if that can be done for applications meant to be released. See this article Deploy Windows Store apps from Visual Studio for details.
Also see if this article is of use to you.
Monday, February 27, 2017 11:53 PM
i foundout that the metro UI is not the problem, my mdf database is the problem...
the error is : error 50 local database runtime error occurred. the sprcified localDB instacnce does not exits
picture:
i installed the Microsoft sql server 2012 express LocalDB and the error 50 shows up like in the picture, but without the sql installation the error 52 shows up
What i need to install if i have a app with localDB mdf maked in visual studio?
Tuesday, February 28, 2017 12:13 AM | 1 vote
i foundout that the metro UI is not the problem, my mdf database is the problem...
the error is : error 50 local database runtime error occurred. the sprcified localDB instacnce does not exits
picture:
i installed the Microsoft sql server 2012 express LocalDB and the error 50 shows up like in the picture, but without the sql installation the error 52 shows up
What i need to install if i have a app with localDB mdf maked in visual studio?
Excellent troubleshooting. So probably your connection string is wrong. Did you set it up as a file?
Introducing LocalDB, an improved SQL Express
Tuesday, February 28, 2017 12:23 AM
Yes it is a file in my visual studio, but the connection string is ok because the app runs normal on my any computer with a visual studion istalled ...
picture of my solution explorer:
u can see the mdf file
Tuesday, February 28, 2017 3:19 AM
Yes it is a file in my visual studio, but the connection string is ok because the app runs normal on my any computer with a visual studion istalled ...
picture of my solution explorer:
u can see the mdf file
It's ok on YOUR machine, but not ok on the target machine. Find out why. I tend to use SQL Server Management Studio for debugging these types of problems. You still haven't shown us your connection string.
Tuesday, February 28, 2017 10:05 AM
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
<connectionStrings>
<add name="Model1" connectionString="data source=(LocalDB)\MSSQLLocalDB;attachdbfilename=|DataDirectory|\BazaPodataka.mdf;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework"
providerName="System.Data.SqlClient" />
</connectionStrings>
</configuration>
Tuesday, February 28, 2017 10:06 AM
this is my app.config and the conn string :
<add name="Model1" connectionString="data source=(LocalDB)\MSSQLLocalDB;attachdbfilename=|DataDirectory|\BazaPodataka.mdf;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework"
providerName="System.Data.SqlClient" />
Tuesday, February 28, 2017 10:10 AM
but i dont understand why this app works on any computer with visual studio installed on it, we try it on 4 diferent computers and it work good but on other computer without visual noting :(
Wednesday, March 1, 2017 7:52 AM
Hi friend,
Welcome to MSDN forum.
>>i dont understand why this app works on any computer with visual studio installed on it, we try it on 4 diferent computers and it work good but on other computer without visual noting :(
Most applications have prerequisites: Components such as the .NET Framework runtime must be available on a target computer in order for the application to run. In your case, you need to check if you have added Prerequisites of .NET Framework in Visual Studio Setup Project, or making sure the computer which without visual studio has installed the corresponding .NET Framework.
Best regards,
Joyce
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected].