Jump to content

How to publish? Or how to release the program to public?

- - - - -

  • Please log in to reply
5 replies to this topic

#1
Doctor

Doctor

    Newbie

  • Members
  • PipPip
  • 23 posts
Hello all!

I'm trying to publish my application.
I go to Project settings and then tab Publish. (I use Microsoft Visual c# 2010 Express)
I set all data and use publish wizard ...

So, when I got the files published (on my local disc) I tried to run it ...
When I run it, the first window appear, I enter data and I click on button that the application goes on.
And then I got crash message ....

If I use compile option the app works fine ... when I publish it, this happen.
Anyone have a tutorial how to do this, or anyone can tell me more about this?

Edit: I think that the problem is that this publish wizard dont include my pictures .... so how can I make it? :confused:

Regards

#2
Momerath

Momerath

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 242 posts
Did you include your pictures as a resource in the project? Also, what error do you get when it crashes, hard to help without knowing something about what is going on :)

#3
Doctor

Doctor

    Newbie

  • Members
  • PipPip
  • 23 posts
Hi, Thanks for answering.

I got the error: (app name) has stopped working ...

and on send error report the details:

Files that help describe the problem:
  C:\Users\Tilen\AppData\Local\Temp\WERFC4.tmp.WERInternalMetadata.xml
  C:\Users\Tilen\AppData\Local\Temp\WER5C3F.tmp.appcompat.txt
  C:\Users\Tilen\AppData\Local\Temp\WER5D89.tmp.mdmp

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

And I didn't have included pictures. Now I included them but still got this crash.

Maybe the problem is here:
pictureBox1.ImageLocation = "Pictures\\"+slikaOzadje+".jpg";
For displaying the picture I use that location which is in projectName\bin\Debug folder.

So how can I include included images to code?

#4
Doctor

Doctor

    Newbie

  • Members
  • PipPip
  • 23 posts
Okay I got it ...
but now I have another problem. I'm using this line to write data to file:

funkcije.zapisi("data1", data_variable, "UserConfig\\" + additional_location_variable + ".txt");

This function write to a file. Now the problem is with path:
"UserConfig\\" + additional_location_variable + ".txt"

When I publish it this doesn works anymore ...
Error:

See the end of this message for details on invoking 

just-in-time (JIT) debugging instead of this dialog box.


************** Exception Text **************

System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\Tilen\AppData\Local\Apps\2.0\NCCKALJ3.XGG\CMNCOKRH.H9K\trav..tion_0000000000000000_0001.0000_b6c40164a7bbbc4d\UserConfig\18299_center.txt'.

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath)

   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)

   at System.IO.StreamWriter.CreateFile(String path, Boolean append)

   at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize)

   at System.IO.StreamWriter..ctor(String path, Boolean append)

   at Travian_bot.funkcije.zapisi(String element, String podatek, String lokacija)

   at Travian_bot.Form2.klikMiske_sredisceMesta(Int32 indeks)

   at Travian_bot.Form2.pictureBox2_MouseClick(Object sender, MouseEventArgs e)

   at System.Windows.Forms.Control.OnMouseClick(MouseEventArgs e)

   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)

   at System.Windows.Forms.Control.WndProc(Message& m)

   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)



************** Loaded Assemblies **************

mscorlib

    Assembly Version: 4.0.0.0

    Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)

    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll

----------------------------------------

My program

    Assembly Version: 1.0.0.0

    Win32 Version: 1.0.0.0

    CodeBase: file:///C:/Users/Tilen/AppData/Local/Apps/2.0/NCCKALJ3.XGG/CMNCOKRH.H9K/trav..tion_0000000000000000_0001.0000_b6c40164a7bbbc4d/myprogram.exe

----------------------------------------

System.Windows.Forms

    Assembly Version: 4.0.0.0

    Win32 Version: 4.0.30319.1 built by: RTMRel

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

----------------------------------------

System.Drawing

    Assembly Version: 4.0.0.0

    Win32 Version: 4.0.30319.1 built by: RTMRel

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

----------------------------------------

System

    Assembly Version: 4.0.0.0

    Win32 Version: 4.0.30319.1 built by: RTMRel

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

----------------------------------------

System.Configuration

    Assembly Version: 4.0.0.0

    Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

----------------------------------------

System.Xml

    Assembly Version: 4.0.0.0

    Win32 Version: 4.0.30319.1 built by: RTMRel

    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

----------------------------------------

Microsoft.mshtml

    Assembly Version: 7.0.3300.0

    Win32 Version: 7.0.3300.0

    CodeBase: file:///C:/Windows/assembly/GAC/Microsoft.mshtml/7.0.3300.0__b03f5f7f11d50a3a/Microsoft.mshtml.dll

----------------------------------------


************** JIT Debugging **************

To enable just-in-time (JIT) debugging, the .config file for this

application or computer (machine.config) must have the

jitDebugging value set in the system.windows.forms section.

The application must also be compiled with debugging

enabled.


For example:


<configuration>

    <system.windows.forms jitDebugging="true" />

</configuration>


When JIT debugging is enabled, any unhandled exception

will be sent to the JIT debugger registered on the computer

rather than be handled by this dialog box.




What I need is a folder where the program will store this files, but when is published it doesnt works.

And also I dont even know where application installs itself ...

Normal (compiled, built) application have 3 MB size and in the same folder is another folder named "UserConfig".
When it is published the .exe file is only 1,3 KB.

I'm realy confused :confused: ... why it dont install normally? :S

#5
Doctor

Doctor

    Newbie

  • Members
  • PipPip
  • 23 posts
What if I only choose Debug --> Build solution
And I take files from bin\Release map?
Is it the same??

And when I receive errror the error report contains almost exacly location where this error occurred, so I think that hackers will get source code easly, right??
How can I protect it?

#6
Drakken255

Drakken255

    Newbie

  • Members
  • Pip
  • 4 posts
IMO, Microsoft's "Publisher" sucks, just like 90% of what they make. Anyway, the best way to publish your application, game or otherwise, is to build it in Release config, find a windows installer maker online, and use that. And if you're worried about hackers decompiling your application, there are programs that scramble your code so decompilers can't produce anything readable. Where they are and what they're called, I don't know.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users